datetimeoffset (data type)
data type datetimeoffset
What changes
- Input
- none
- Output or change
- none
Syntax at a glance
datetimeoffset [ ( fractional seconds precision ) ]
Work example
Store a date and time together with its numeric UTC offset.
Preserve the offset at ingestion and convert to UTC only when the business rule requires it.
Check your work datetimeoffset keeps an offset, not a named time zone or its daylight-saving rules.
Practice SQL
Open in SQL FlowSELECT CAST('2026-04-05T12:30:00+05:30' AS datetimeoffset(0)) AS local_event_time;
Open Microsoft Learn for full syntax, permissions, and details for your version.