开发者

SQL Server UTC to local time

开发者 https://www.devze.com 2023-02-07 01:44 出处:网络
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 functio

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())
0

精彩评论

暂无评论...
验证码 换一张
取 消