http://blog.sqlauthority.com/2014/02/15/sql-server-get-current-timezone-name-in-sql-server/
DECLARE @TimeZone VARCHAR(50)EXEC MASTER.dbo.xp_regread 'HKEY_LOCAL_MACHINE','SYSTEM\CurrentControlSet\Control\TimeZoneInformation','TimeZoneKeyName',@TimeZone OUTSELECT @TimeZone
DECLARE @TimeZone VARCHAR(50)EXEC MASTER.dbo.xp_regread 'HKEY_LOCAL_MACHINE','SYSTEM\CurrentControlSet\Control\TimeZoneInformation','TimeZoneKeyName',@TimeZone OUTSELECT @TimeZone
No comments:
Post a Comment