Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
To support timezone DateTime
Message
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:
01393404
Views:
33
>>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

I haven't checked, but was this function introduced in SQL Server 2008?
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform