|
 |
asp_web_howto thread: Adding 5 hours to current time()
Message #1 by david@s... on Tue, 28 Aug 2001 13:03:16
|
|
Hi,
My site is hosted in the US on a server with US EST regional settings but
I want to display date and times in GMT.
So, when I call the Date() function, I want to add 5 hours (the difference
between the regional setting and GMT).
For example, if the regional setting is 23:47 on 28th August 2001 then I
want to return 04:47 on 29th August 2001.
I've tried using the following: DateAdd("h", 5, Date()) but this returns
05:00 on 28th August 2001.
i.e it adds 5 hours to the beginning of the day, it does not add 5 hours
to current time.
Does anyone have any ideas how to get around this problem
Cheers
Dave
Message #2 by "Bailey, Mark" <MBailey@m...> on Tue, 28 Aug 2001 08:10:26 -0400
|
|
Try:
DateAdd("h",5,Now)
-----Original Message-----
From: david@s... [mailto:david@s...]
Sent: Tuesday, August 28, 2001 9:03 AM
To: ASP Web HowTo
Subject: [asp_web_howto] Adding 5 hours to current time()
Hi,
My site is hosted in the US on a server with US EST regional settings but
I want to display date and times in GMT.
So, when I call the Date() function, I want to add 5 hours (the difference
between the regional setting and GMT).
For example, if the regional setting is 23:47 on 28th August 2001 then I
want to return 04:47 on 29th August 2001.
I've tried using the following: DateAdd("h", 5, Date()) but this returns
05:00 on 28th August 2001.
i.e it adds 5 hours to the beginning of the day, it does not add 5 hours
to current time.
Does anyone have any ideas how to get around this problem
Cheers
|
|
 |