开发者

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜