SQL Server UTC to local time
is there a function in SQL Server, which 开发者_JS百科returns difference between UTC time and local time of the server?
If you're using SQL 2008, then using the datetimeoffset type and related functions are much better. But assuming you're talking about the current offset, you could do something like:
DATEDIFF(minute, GETUTCDATE(), GETDATE())
精彩评论