March 2018
Intermediate to advanced
816 pages
19h 35m
English
The AT TIME ZONE expression can be used to represent time in a given time zone. It converts an input date to the corresponding datetimeoffset value in the target time zone. It has the following two arguments:
The return type of the expression is datetimeoffset in the target time zone.
Use the following code to display local UTC time, and the local time in New York and Vienna:
SELECT CONVERT(DATETIME, SYSDATETIMEOFFSET()) AS UTCTime, CONVERT(DATETIME, SYSDATETIMEOFFSET() AT ...
Read now
Unlock full access