Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Get Time Zone Offset in Hours

Author  Topic 

xrum
Yak Posting Veteran

87 Posts

Posted - 2011-09-01 : 14:50:40
Hi

i have a column with the following values: M E P

is it possible to get current time zone offset in hours, using that column?

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2011-09-01 : 15:03:21
[code]SELECT CASE yourColumn
WHEN 'E' THEN -5
WHEN 'M' THEN -7
WHEN 'P' THEN -8
END as OffSet
FROM yourTable;[/code]

See this timezone chart
Go to Top of Page

xrum
Yak Posting Veteran

87 Posts

Posted - 2011-09-01 : 15:08:01
thank you!
Go to Top of Page

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2011-09-01 : 15:15:47
Welcome. Glad to help
Go to Top of Page
   

- Advertisement -