July 30, 2008 at 3:11 am
Hello,
How can we set the Time Zone of a database permenently?
It should work regardless of OS Time Zone.
Any solution for getting different datatime for two different database instance running on same sql server.
Any Solution other than getutcdate() in appreciable
Regards,
KCube
July 30, 2008 at 7:11 am
SQL defers to the OS for knowing date, time and timezone. You can't set it within SQL Server.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
July 30, 2008 at 12:39 pm
In SQL 2008 you could use the DateOffset type, but there really isn't a way to do that in SQL 2000/2005, without building a complex control of your own.
You could build a function that would read the current time from the OS, and modify it by the time-zone you want to use, then use that function instead of getdate(). Might work.
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
July 30, 2008 at 9:52 pm
Thanks very much for the help
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply