Print Page | Close Window

Change order date to timestamp.

Printed From: ProductCart E-Commerce Solutions
Category: ProductCart
Forum Name: Customizing ProductCart
Forum Description: Exchange messages with other users that are customizing ProductCart.
URL: https://forum.productcart.com/forum_posts.asp?TID=5814
Printed Date: 23-November-2024 at 4:40pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Change order date to timestamp.
Posted By: Brett
Subject: Change order date to timestamp.
Date Posted: 03-March-2014 at 3:52pm
I wanted to be able to see when Incomplete orders are appearing. It looks like SaveOrd.asp creates the initial incomplete order when a customer starts checking out.


'<<==== create date order var====>>
pDateOrder=Date()
if SQL_Format="1" then
     pDateOrder=Day(pDateOrder)&"/"&Month(pDateOrder)&"/"&Year(pDateOrder)
else
     pDateOrder=Month(pDateOrder)&"/"&Day(pDateOrder)&"/"&Year(pDateOrder)
end if

Right after that code I put this to overwrite the variable:
pDateOrder = now()


So far, it hasn't blown anything up. I just created an incomplete order and everything appears the same on the dashboard, but within the database I can actually see the time the incomplete order was created.

Has anyone done this before? Do you forsee any issues?



Replies:
Posted By: Guests
Date Posted: 05-March-2014 at 1:36am
This will be fine if you are in the US or using that date format and your server is also in the US.

To add the more detailed time stamp to the date in either format, simply append:
&TIME()

That is:
pDateOrder = pDateOrder &" "&TIME()



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