ProductCart E-Commerce Solutions Homepage
Forum Home Forum Home > ProductCart > Getting Started
  New Posts New Posts RSS Feed - Time stamp
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Time stamp

 Post Reply Post Reply
Author
Message
Cborj View Drop Down
Newbie
Newbie


Joined: 05-February-2008
Location: United States
Status: Offline
Points: 0
Post Options Post Options   Thanks (0) Thanks(0)   Quote Cborj Quote  Post ReplyReply Direct Link To This Post Topic: Time stamp
    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
Back to Top
Hamish View Drop Down
Admin Group
Admin Group


Joined: 12-October-2006
Location: United Kingdom
Status: Offline
Points: 56
Post Options Post Options   Thanks (0) Thanks(0)   Quote Hamish Quote  Post ReplyReply Direct Link To This Post Posted: 12-July-2009 at 1:56pm
Hi,
  On which page? It's a formatting issue most likely.
Back to Top
Greg Dinger View Drop Down
Certified ProductCart Developers
Certified ProductCart Developers
Avatar

Joined: 23-September-2006
Location: United States
Status: Offline
Points: 238
Post Options Post Options   Thanks (0) Thanks(0)   Quote Greg Dinger Quote  Post ReplyReply Direct Link To This Post Posted: 12-July-2009 at 2:04pm
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.
Back to Top
Guests View Drop Down
Guest
Guest
Post Options Post Options   Thanks (0) Thanks(0)   Quote Guests Quote  Post ReplyReply Direct Link To This Post Posted: 12-July-2009 at 2:50pm
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:
Back to Top
Cborj View Drop Down
Newbie
Newbie


Joined: 05-February-2008
Location: United States
Status: Offline
Points: 0
Post Options Post Options   Thanks (0) Thanks(0)   Quote Cborj Quote  Post ReplyReply Direct Link To This Post Posted: 12-July-2009 at 4:18pm
Yes, thanks Greg.  Only need to change the display.  And thanks for you suggestion!
CB
Back to Top
Cborj View Drop Down
Newbie
Newbie


Joined: 05-February-2008
Location: United States
Status: Offline
Points: 0
Post Options Post Options   Thanks (0) Thanks(0)   Quote Cborj Quote  Post ReplyReply Direct Link To This Post Posted: 12-July-2009 at 4:20pm
Thank you Sean for the info.  It's great to have so many highly qualified people willing to help nontechnical people like me!
CB
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.063 seconds.