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)
 Time ZOne for SQL server

Author  Topic 

gangadhara.ms
Aged Yak Warrior

549 Posts

Posted - 2011-10-24 : 22:00:59
Dear All,

I have web server at Australia Sydney and Database server at US Rariton whenever the any transaction has happened in application it shows US DB server time which Datemodifed column having getdate(), how do we over rid of this for a particular database.

Thanks,
Gangadhara MS
SQL Developer and DBA

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2011-10-24 : 22:10:28
You'll need to do a timezone conversion. We use GMT as our timezone on our database servers to make the conversion easiest. We have done conversions in T-SQL via a scalar UDF and also in the application.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

Sachin.Nand

2937 Posts

Posted - 2011-10-25 : 02:40:48
If you are using SQL Server 2008 then you can consider using DATETIMEOFFSET data type as you can save the offset in the date value itself.

PBUH

Go to Top of Page

eljapo4
Posting Yak Master

100 Posts

Posted - 2011-10-27 : 05:29:54
I'm having something of a similar issue, we have a few SP's (SQL Server 2005) on our DB which is on GMT time but the application that uses these SP's is used by my French colleagues so any SP's that they use I would like to set the time on them to be GMT +1hr. Is this possible to do without changing the DB server time?
Thanks
Go to Top of Page
   

- Advertisement -