February 4, 2013 at 2:07 am
How i can convert my timezone in sql server,
My requirement is to save date in client time zone not as UTC, and in another sp i need to convert these time to UTC.
Is there any to convert time zone in sql server 2008?
February 4, 2013 at 3:44 am
Do you know in what "zone" your datetime is saved? If not, then there is no way to convert it reliably to UTC.
Usually, if your system needs to be designed to cater for different time zones, you would save the datetime in UTC form, and convert it based on locale...
February 4, 2013 at 3:59 am
Yes, I know the zone of saved date. Other than this i have saved date in UTC but in this case i need to save date of local time with zone.
February 4, 2013 at 4:11 am
There is datetimeoffset T-SQL function to help you. You will need to keep time offset in form of [+|-] hh:mm, in order to use it.
February 4, 2013 at 4:37 am
Does is support Day Light Saving as well ?
February 4, 2013 at 4:49 am
This function applies offset to the given datetime. You need to keep or calculate somehow proper offset, in order to apply it.
May 3, 2014 at 4:07 am
Check out T-SQL Toolbox on CodePlex: http://tsqltoolbox.codeplex.com
It offers easy datetime conversion UDFs using plain T-SQL!
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply