Listed here are the additional SQL Server date and time data types:
- DATETIME2: This data type in SQL Server is very similar to DATETIME, in that it holds a date with a time of day based on the 24-hour clock, but DATETIME2 allows a larger date range and larger default fractional precision for seconds. The date range for this type is 0001-01-01 through 9999-12-31, and the time range is 00:00:00 through 23:59:59.9999999. In MySQL, use DATETIME for this data type.
- SMALLDATETIME: This data type in SQL Server is similar to DATETIME, in that it holds a date with a time of day based on the 24-hour clock, but SMALLDATETIME doesn't allow fractional seconds. The date range for this type is 1900-01-01 through 2079-06-06, and the time range ...