Print Page | Close Window

Time stamp

Printed From: ProductCart E-Commerce Solutions
Category: ProductCart
Forum Name: Getting Started
Forum Description: Installing, activating, and getting started with ProductCart
URL: https://forum.productcart.com/forum_posts.asp?TID=2867
Printed Date: 05-October-2024 at 9:35pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Time stamp
Posted By: Cborj
Subject: Time stamp
Date 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



Replies:
Posted By: Hamish
Date Posted: 12-July-2009 at 1:56pm
Hi,
  On which page? It's a formatting issue most likely.


-------------
Editing ProductCart Code?

See http://wiki.earlyimpact.com/developers/editcode" rel="nofollow - WIKI Guidelines for Editing ProductCart's ASP Source Code



Posted By: Greg Dinger
Date 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.


-------------
GreyBeard Design Group

Certified ProductCart Developer

Web Design/Development/Hosting

http://tinyurl.com/5c8t4t" rel="nofollow - Add-Ons & Custom Code |


Posted By: Guests
Date 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:
http://www.w3schools.com/vbScript/func_formatdatetime.asp - http://www.w3schools.com/vbScript/func_formatdatetime.asp


Posted By: Cborj
Date Posted: 12-July-2009 at 4:18pm
Yes, thanks Greg.  Only need to change the display.  And thanks for you suggestion!

-------------
CB


Posted By: Cborj
Date 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



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net