在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
复制代码 代码如下: DECLARE @LocalDate DATETIME, @UTCDate DATETIME, @LocalDate2 DATETIME SET @LocalDate = GETDATE() SET @UTCDate = DATEADD(hour, DATEDIFF(hour,GETDATE(),GETUTCDATE()), @LocalDate) SET @LocalDate2 = DATEADD(hour, DATEDIFF(hour,GETUTCDATE(),GETDATE()), @UTCDate) SELECT '1. Now' [Now], @LocalDate [DateTime] UNION SELECT '2. UTC', @UTCDate UNION SELECT '3. Now again', @LocalDate2 |
请发表评论