Print Page | Close Window

The right now()

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=2700
Printed Date: 29 March 2026 at 4:24pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: The right now()
Posted By: Mart
Subject: The right now()
Date Posted: 14 May 2003 at 10:02am

Hi, my host is not in the same country as me (host in america im in sunny england) how can I adjust now() to make it the correct british date and time?

Thanks, Martin. 




Replies:
Posted By: MorningZ
Date Posted: 14 May 2003 at 1:01pm

DateAdd(h,-X,Now())

Where X is the hours offset

Stuff like this is readily avaible at sites like:
http://www.devguru.com/Technologies/vbscript/quickref/functions.html - http://www.devguru.com/Technologies/vbscript/quickref/functions.html
http://www.aspfaqs.com/aspfaqs/ShowCategory.asp?CatID=3 - http://www.aspfaqs.com/aspfaqs/ShowCategory.asp?CatID=3



-------------
Contribute to the working anarchy we fondly call the Internet


Posted By: michael
Date Posted: 14 May 2003 at 1:10pm
You can put a little function like that into your code and use rightnow() instead of now(). It is set to +6 hours here but can change to whatever you want.
Function rightnow()
       rightnow = DateAdd("h",6,now())
End Function

-------------
http://baumannphoto.com" rel="nofollow - Blog | http://mpgtracker.com" rel="nofollow - MPG Tracker



Print Page | Close Window

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