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
 Transact-SQL (2000)
 Convert GMT to PST timestamp

Author  Topic 

ladiaocb
Yak Posting Veteran

57 Posts

Posted - 2008-10-14 : 12:55:29
I have a timestamp column that is in GMT:

id-------datetime
1--------9/22/08 17:56
2--------9/16/08 21:25
3--------9/16/08 16:19

I would like to convert this time into PST (GMT+8hrs).

I know its something really easy I just can't remember it to save my life.

Thanks!

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-10-14 : 12:58:13
SELECT DATEADD(hh,8,datetime) AS datetimeinpst FROM Table
Go to Top of Page

ladiaocb
Yak Posting Veteran

57 Posts

Posted - 2008-10-14 : 13:02:05
I knew it was that easy. Thanks much!!
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-10-14 : 13:06:43
quote:
Originally posted by ladiaocb

I knew it was that easy. Thanks much!!


you're welcome
Go to Top of Page
   

- Advertisement -