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
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Calculating Time Zone Difference

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2003-05-26 : 09:22:40
Nameesh writes "I would like to calculate difference between 2 time zones.

for example If I am in India and wants to see what is the current time in US or in Europe, How can i calculate it.

Please help."

simondeutsch
Aged Yak Warrior

547 Posts

Posted - 2003-05-26 : 20:55:48
Check out the DATEDIFF and DATEADD functions. For more dynamic queries, not to have to hardcode the location, you might want to make a table covering all time zones relative to India, and you can pass that to the function.

Sarah Berger MCSD
Go to Top of Page

rrb
SQLTeam Poet Laureate

1479 Posts

Posted - 2003-05-26 : 21:15:21
Nameesh

Do you have any data to base your calculation on? Do you have a table which stores the timezone info?

Your easiest option is to store your data in GMT when it is initially entered, and then the calculation is trivial.

Ask more...

--
I hope that when I die someone will say of me "That guy sure owed me a lot of money"
Go to Top of Page
   

- Advertisement -