In SQL Server, the
DATE data type is used to store date values. It stores the date as a three-byte integer, representing the number of days since January 1, 1900.
The range of values that can be stored in a
DATE column is from January 1, 1753 to December 31, 9999.
The date is stored in the format of
YYYY-MM-DD and does not include the time or time zone information.
When creating a table, you can specify
DATE as the data type for a column to indicate that the column will only store date values.
DATE data type also provides several built-in functions to extract different parts of the date such as year, month, and day, or
to perform date calculations.
|Default string literal format
|0001-01-01 through 9999-12-31
|3 bytes, fixed
DECLARE @date date= '08-21-14';
SELECT @date AS 'Date';
Summary: On Transact SQL language the date is part of date and time data types and define a date on sql server.