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.
Author |
Topic |
noamg
Posting Yak Master
215 Posts |
Posted - 2010-11-17 : 02:35:53
|
hi,I have a server with few databases. all the DBs have the same schemas. But each one works for other country.the rows must include the local time of each country.is their any way to config the DB for specific timezone ?so the GETDATE() will return the local time.thanksNoam Graizer |
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2010-11-17 : 02:53:09
|
The value that is returned by GETDATE() comes from the operating system of that computer so there is no chance that GETDATE() returns another result for each database. No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
chadmat
The Chadinator
1974 Posts |
Posted - 2010-11-17 : 03:46:55
|
You could create a function in each DB that knows the offset from the Server Time, and returns local time for that DB.-Chad |
 |
|
noamg
Posting Yak Master
215 Posts |
Posted - 2010-11-17 : 04:06:41
|
off course, this is application solution.but, it their any system solution ?Noam Graizer |
 |
|
chadmat
The Chadinator
1974 Posts |
Posted - 2010-11-17 : 11:18:41
|
No, how could their be, the databases have no concept of what timezone they are in other than the timezone that the server is in.-Chad |
 |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
|
|