June 12, 2006 at 5:47 am
hi all,
I have a serious problem with my date fields in database. please suggest me what would be the best practice to handle the dates in distributed database environments.
like in my country A and the other country B have the time difference of 3 Hr between them. so in my country A 12.00am struck before the country B. and if i have closed my month end financial reports on this time and date according to country A. then my entries during that 3 Hrs have been lost.
please let me know how can i handle this date problem in my database, is there any function or any other theory.??
Thanks in advance and waiting for guidence.
Noman
June 12, 2006 at 2:03 pm
The method that I have used in the past is to pick a single time zone as the time of record and to then keep track of the offset from that time zone in the local configuration. My suggestion would be to use GMT.
WABALUBADUBDUB
June 13, 2006 at 7:44 am
It can be helpful to use the GetUTCDate() function, which returns current Universal Coordinated Time/ Greenwich Mean Time, based on the local time and timezone settings of the server SQL Server is running on.
June 13, 2006 at 8:16 am
Ward Pond addresses this issue in a recent blog post.
Database Programming: Slaying The Time Zone Conversion Beast (or at least rendering it comatose)
You may take a look at that as he provides a solution to the issue.
K. Brian Kelley
@kbriankelley
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply