The T-SQL type for combined dates and times that Fabric Data Warehouse uses because datetime and smalldatetime aren't supported there. Its precision must always be stated and can be anywhere from 0 to 6 fractional-second digits.
Read more: Microsoft Learn
In the Ultra Transcenders books
Each book explains DATETIME2 in context, with comparison tables and the common traps.
Terms in this definition
- T-SQL
The dialect of SQL that Microsoft uses for Azure SQL and SQL Server. Azure Monitor logs are queried with KQL instead.
- Warehouse
Fabric item offering complete T-SQL support (DML, DDL, multi-table transactions) over Delta tables held in OneLake; lakehouse SQL analytics endpoints, by contrast, are read-only.
Related terms
- datetimeoffset
A data type holding a date and time together with an offset from UTC between -14:00 and +14:00. The offset is lost when the value is converted to datetime2.
- Period columns
In a system-versioned temporal table, two datetime2 columns (ROW START and ROW END, tied together by PERIOD FOR SYSTEM_TIME and marked GENERATED ALWAYS) holding the UTC span in which each version of a row was valid; the engine populates them itself.