TODATETIMEOFFSET Date Function TSQL Tutorial

TODATETIMEOFFSET is an date function and returns a datetimeoffset value that is translated from a datetime2 expression.

TODATETIMEOFFSET Syntax:

TODATETIMEOFFSET ( expression , timezone )

TODATETIMEOFFSET Example:

SELECT TODATETIMEOFFSET (GETDATE(), '-01:00') Result_1,
TODATETIMEOFFSET (SYSDATETIME(), -60) Result_2;

Result_1Result_2
2014-03-01 16:56:42.640 -01:002014-03-01 16:56:42.6419167 -01:00