![]() |
Time stamp |
Post Reply ![]() |
Author | |
Cborj ![]() Newbie ![]() Joined: 05-February-2008 Location: United States Status: Offline Points: 0 |
![]() ![]() ![]() ![]() ![]() Posted: 12-July-2009 at 1:28pm |
Customer wants to drop the last two zeros in the time stamp. For example, time stamp currently reads 7:30:00
Customer would like it to read 7:30 I assume this is an ASP code tweak? |
|
CB
|
|
![]() |
|
Hamish ![]() Admin Group ![]() Joined: 12-October-2006 Location: United Kingdom Status: Offline Points: 56 |
![]() ![]() ![]() ![]() ![]() |
Hi,
On which page? It's a formatting issue most likely. |
|
![]() |
|
Greg Dinger ![]() Certified ProductCart Developers ![]() ![]() Joined: 23-September-2006 Location: United States Status: Offline Points: 238 |
![]() ![]() ![]() ![]() ![]() |
I presume you mean for display purposes only, and that you don't feel a need to actually alter the way the timestamp is stored internally.
When I need to manipulate the display of date/time data I use a script like this: http://www.4guysfromrolla.com/webtech/022701-1.shtml Copy/paste the entire block of code into a .asp file, place that file into your site, then reference it as an include to the page you wish to alter. Then reference Function fncFmtDate to format the date and time. The above article contains a demo of how to use the function. |
|
![]() |
|
Guests ![]() Guest ![]() |
![]() ![]() ![]() ![]() ![]() |
Greg's suggestion is great if you want total control over your date/time formatting.
However, if you want to cut right to the chase on eliminating the seconds, you could use the build in VB FormatDateTime() function like so:
FormatDateTime(Now(),4)
This will return the 24 hr hour:minute format without the seconds.
You could also replace Now() with a time stamp stored somewhere, such as in the database.
Here's a reference:
|
|
![]() |
|
Cborj ![]() Newbie ![]() Joined: 05-February-2008 Location: United States Status: Offline Points: 0 |
![]() ![]() ![]() ![]() ![]() |
Yes, thanks Greg. Only need to change the display. And thanks for you suggestion!
|
|
CB
|
|
![]() |
|
Cborj ![]() Newbie ![]() Joined: 05-February-2008 Location: United States Status: Offline Points: 0 |
![]() ![]() ![]() ![]() ![]() |
Thank you Sean for the info. It's great to have so many highly qualified people willing to help nontechnical people like me!
|
|
CB
|
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |