Microsoft
Software
Hardware
Network
Question : SQL Server 2008 work with GTM date
Hi experts!
I have e product working via Internet with user being in different time zones. My product is ready with SQL Server 2005, but I consider change it to SQL Server 2008 primary because of this new date type.
My question is follow:
Can SQL Server 2008 handle with scenario like this:
User A with GTM +2 connect and write a date in SQL Serer which work on GTM 0 and write datehour 5 p.m
User B with GTM-2 connect to server with GTM0 and when make query for data of user A see his data enter corrected with his GTM offset. For up example, he to see 1 p.m (which is 5 p.m for user A)
If can, question is – how???
Thanks!
Answer : SQL Server 2008 work with GTM date
In simple words,
* While storing records in your table use SELECT GETUTCDATE() instead of GETDATE()
* While retrieving records from the table use
SELECT dateadd(ss, DATEDIFF(ss, GETUTCDATE(), GETDATE()), ur_date_column)
Random Solutions
FAXCOOLWAREZ037 192.168.1.38 00-1A-73-C3-39-8A
Excel Interop: Find cell by name
How to configure the email check interval in Lotus Domino 8
Blackberry Printing
OpenDNS some need full access
Trying to use recovery storage group to restore exchange database
Determining Size of Disks for Exchange 2010 Migration
VB.NET - New to MultiThreading - Parameter Count Mismatch
Removing NOT NULL to a column doesn't work
Network issues loading company web-site