SQL Server 2008 range of values for various datetime

Source: Internet
Author: User
Original: SQL Server 2008 range of values for various datetime

In addition to datetime and smalldatetime, SQL Server 2008 adds four additional time types: Date,time,datetime2 and DateTimeOffset.

Each time type range, precision list:

Data type Time range accuracy

DateTime 1753-01-01 to 9999-12-31 00:00:00 to 23:59:59.997 3.33 ms

smalldatetime 1900-01-01 to 2079-06-06 00:00:00 to 23:59:59 minutes

Date 0001-01-01 to 9999-12-31 days

Time 00:00:00.0000000 to 23:59:59.9999999 100 nanoseconds

DateTime2 0001-01-01 to 9999-12-31 00:00:00 to 23:59:59.9999999 100 nanoseconds

DateTimeOffset 0001-01-01 to 9999-12-31 00:00:00 to 23:59:59.9999999-14:00 to +14:00 100 nanoseconds

List of time-type expressions: Data type output is 12:35:29. 1234567 date 2007-05-08 smalldatetime 2007-05-08 12:35:00 datetime 2007-05-08 12:35:29.123 datetime2 2007-05-08 12:35:29. 1234567 DateTimeOffset 2007-05-08 12:35:29.1234567 +12:15

SQL Server 2008 range of values for various datetime

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.