
datetime (Transact-SQL) - SQL Server | Microsoft Learn
To use the ISO 8601 format, you must specify each element in the format, including the T, the colons (:), and the period (.) that are shown in the format. The brackets indicate that the fraction of second …
FORMAT (Transact-SQL) - SQL Server | Microsoft Learn
Returns a value formatted with the specified format and optional culture. Use the FORMAT function for locale-aware formatting of date/time and number values as strings. For general data type …
Date and Time Data Types and Functions - SQL Server (Transact-SQL ...
Date and time functions The following tables list the Transact-SQL date and time functions. For more information about determinism, see Deterministic and Nondeterministic Functions.
CAST and CONVERT (Transact-SQL) - SQL Server | Microsoft Learn
Reference for the CAST and CONVERT Transact-SQL functions. These functions convert expressions from one data type to another.
datetime2 (Transact-SQL) - SQL Server | Microsoft Learn
Defines a date that is combined with a time of day that is based on 24-hour clock. datetime2 can be considered as an extension of the existing datetime type that has a larger date range, a larger default …
SET DATEFORMAT (Transact-SQL) - SQL Server | Microsoft Learn
The DATEFORMAT setting may interpret character strings differently for date data types, depending on their string format. For example, datetime and smalldatetime interpretations may not match date, …
date (Transact-SQL) - SQL Server | Microsoft Learn
Datetime data types allow dates in the Gregorian format to be stored in the date range 0001-01-01 CE through 9999-12-31 CE. The default string literal format, which is used for down-level clients, …
time (Transact-SQL) - SQL Server | Microsoft Learn
When you convert to date and time data types, SQL Server rejects all values it cannot recognize as dates or times. For information about using the CAST and CONVERT functions with date and time …
datetimeoffset (Transact-SQL) - SQL Server | Microsoft Learn
When you convert to date and time data types, SQL Server rejects all values that it can't recognize as dates or times. For information about using the CAST and CONVERT functions with date and time …
Date and Time Data - ADO.NET | Microsoft Learn
You can specify date and time data types by using a variety of different literal string formats, which SQL Server then evaluates at runtime, converting them to internal date/time structures.