Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
To support timezone DateTime
Message
 
To
04/04/2009 09:30:28
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
C# 3.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01393251
Message ID:
01393252
Views:
36
>Hi,
>I am developing an application which would supports multiple country (one country per database/application). How could I manage the datetime for each country application/database which reside at the same server? For example, store datetime value and display current datetime based on specified timezone. Any other thing need to be considered?
>
>Thank you

Instead of using GETDATE() function use GETUTCDATE() function. That will return UTC date time. Then when user wants date back you should convert it to Local time:
http://www.codeproject.com/KB/database/ConvertUTCToLocal.aspx

http://www.windows-tech.info/15/9115c76955a6a6e1.php
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform