Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

date format

Status
Not open for further replies.

5656

Technical User
Jan 6, 2001
68
US
This may be more of a vb question, but thought I'd start here. I have the following script placing the date on my web page: <%= formatdatetime((now),vblongdate) %>, however my webhost's server is 3 hours ahead of me and my target audience (so at 9pm my time the date is showing the following day). How can I adjust the above script back 3 hours?

Thank you for any help !!
 
Dim dtNow
dtNow = Now()

Response.Write DateAdd(&quot;h&quot;, 3, dtNow)
 
Dim dtNow
dtNow = Now()
'oh, back 3 hours
Response.Write DateAdd(&quot;h&quot;, -3, dtNow)
 
99miles,
Thank you. That does work, but I'd like to use the current format I have <%= formatdatetime((now),vblongdate) %>, which when displayed reads: &quot;Sunday, May 05, 2002&quot;

My problem is that I need to back up 3 HOURS...but when I insert a &quot;-3&quot; into my above script it backs up 3 DAYS.
Any additional suggestions would be great. Thanks again !
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top