SQL Flow Field Guide

SYSDATETIMEOFFSET

Catalog support for SQL Server 2022 (16.x) and 2025 (17.x)

nondeterministic time source

What changes

Input
system clock or time zone of the server
Output or change
current date/time value
Return type
datetimeoffset(7)

Syntax at a glance

SYSDATETIMEOFFSET ( )

Work example

Read the host local date and time with its current numeric offset.

Test month end, leap day, offset, and the session language that will run the query.

Check your work The offset does not preserve a time-zone name or daylight-saving rules.

Open Microsoft Learn for full syntax, permissions, and details for your version.