On Tue, Feb 7, 2012 at 10:06 AM, Fred Taylor <fbtay...@gmail.com> wrote: > Any body know of a way to intercept the returns from DATE(), DATETIME(), > TIME() etc. for different timezones WITHOUT changing the Windows setting > for timezone? > > We've moved a bunch of applications to the cloud and now have users > accessing from multiple timezones, but the application wasn't built to > handle that. We can't just change the Windows timezone, as that would > confuse the users with their Outlook calendars, or any other time based > applications. There are 5 applications and they would have about 9,000 > places each in the code would need to be changed if we have to change the > calls to DATE(), DATETIME(), etc. to use a different function. Most > definitely not looking forward to 45K changes to code! > > Thanks for any insight in to this (huge) dilemma. -------------------------------
<http://www.4guysfromrolla.com/articles/081507-1.aspx> Universal time is actually the basis of all time and from there the machine will adjust it to local. :) If you do a test to catch getdate() say a million times and then use getUTCDate() it will be faster with the second. SELECT toUTC([MyDateColumn], [MyTimeZoneColumn]) FROM [MyTable] here is a function to do it in vb or C# <http://www.codeproject.com/Articles/31146/SQL-2005-Time-Zone-Conversion-Functions> -- Stephen Russell 901.246-0159 cell _______________________________________________ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/cajidmy+0fn0bg_ob_wrppej03zy13ffsjilt_f0gmwjua51...@mail.gmail.com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.