October 1, 2003 at 3:49 am
Hi there,
Im confused on what datetime format I should be using to compare a timestamp entry. Should I use the getdate function of the getutcdate?
I have a stored procedure that uses the datediff function to compare a login time with now, now being getdate.
The system could potentially be used in other european countries accessing a web server in this country. Does it really matter which one I use as long as Im consistent throught the system??
Cheers
Dave
October 1, 2003 at 6:06 am
If there will always be just one logical server (i.e. no replication) and the "login time" is being calculated at the server, then it matters not.
--Jonathan
--Jonathan
October 1, 2003 at 10:53 am
I think you might want UTC date for the comparisons if you are getting data from 2 different time zones. But yes the time is calculated on the server.
Steve Jones
http://www.sqlservercentral.com/columnists/sjones
The Best of SQL Server Central.com 2002 - http://www.sqlservercentral.com/bestof/
October 1, 2003 at 12:43 pm
if you are comparing datetime logged in with getdate from servers in other countrys, don't forget about timezones.
October 17, 2003 at 4:27 am
Thanks for the response, thats cleared it up!
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply