January 26, 2012 at 11:41 pm
I have an application which has times from different time zones. How do i convert these times to GMT? Please help me ASAP
January 26, 2012 at 11:53 pm
Many people choose to store dates and times in UTC (i.e. without a time zone). There is a good explanation of the technique here:
http://sqlblog.com/blogs/aaron_bertrand/archive/2012/01/10/t-sql-tuesday-26-second-chances.aspx
January 26, 2012 at 11:54 pm
Is it possible to give some sample data and desired output?
For starters, check out the datetimeoffset datatype:
http://msdn.microsoft.com/en-us/library/bb630289.aspx
ps: I think most people here want help asap. No need to point out the obvious.
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
January 26, 2012 at 11:56 pm
Koen Verbeeck (1/26/2012)
For starters, check out the datetimeoffset datatype:
One of the many issues with DATETIMEOFFSET is it doesn't handle things like daylight savings time.
January 27, 2012 at 12:01 am
SQL Kiwi (1/26/2012)
Koen Verbeeck (1/26/2012)
For starters, check out the datetimeoffset datatype:One of the many issues with DATETIMEOFFSET is it doesn't handle things like daylight savings time.
Ah, that is good to know.
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
January 27, 2012 at 12:08 am
i get different times from different zones like US, India etc. i need this to be converted to GMT keeping daylight saving into account. I am very new to sql server. it would be great if you could give some examples so that i can understand easily:-)
January 27, 2012 at 12:11 am
anandtr (1/27/2012)
i get different times from different zones like US, India etc. i need this to be converted to GMT keeping daylight saving into account. I am very new to sql server. it would be great if you could give some examples so that i can understand easily:-)
Did you read the link I posted earlier? There are quite a few examples there...
Viewing 7 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply