My server save time in LOCAL time not including Time Zones info in dateTime2. Server is in -7 GMT. I need to create an SQL which show records but converted at TimeZone for User (+1 GMT).
Let's imagine I have this record '2014-05-27 01:00:00' Should be displayed as '2014-05-27 09:00:00'
Using the following script I am not able to get the result desired. Could you please point me out the problem?
SELECT CONVERT(datetime,
SWITCHOFFSET(CONVERT(datetimeoffset,
'2014-05-27 01:00:00'),
DATENAME(TzOffset, SYSDATETIMEOFFSET())))