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 2005 Forums
 Transact-SQL (2005)
 Convert EXISTING GMT values in column to PST

Author  Topic 

bp
Starting Member

1 Post

Posted - 2010-01-28 : 20:12:29
Hello,

I have a datetime column that is in GMT. I need to convert existing GMT values in the column to PST. I also want to handle daylight savings. How do I do that?

I have looked around but I couldn't find much except how to get the CURRENT time different between UTC and system dates using getutcdate and getdate. Nothing for converting existing GMT values to PST.

I am aware that I can write a workaround that has the daylight savings start and end dates for the PST timezone and simply deduct that from the existing values in the GMT column. I was hoping for something simpler that was built in.

Any help would be appreciated.

Thanks.
BP

Kristen
Test

22859 Posts

Posted - 2010-01-29 : 02:20:43
SQL 2008 has some datetime handling for regions, I haven't looked at it so no idea if it helps with your problem, and it wasn't available in SQL 2005 IIRC
Go to Top of Page
   

- Advertisement -