New data types in SQL 2008

  • Comments posted to this topic are about the item New data types in SQL 2008

    If everything seems to be going well, you have obviously overlooked something.

    Ron

    Please help us, help you -before posting a question please read[/url]
    Before posting a performance problem please read[/url]

  • What is the DateTime2 and DateTimeOffset?

  • To save y'all the trouble of clicking each MSDN link given in the solution, here are my condensations of the basic definitions....

    date

    Defines a date. Three bytes with a range of 0001-01-01 through 9999-12-31.

    time

    Defines a time of day. Optionally specify a precision for the fractions of a second. Three to five bytes depending on precision (0-7 digits for fraction of second).

    datetime2

    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 (0001-01-01 through 9999-12-31), a larger default fractional precision, and optional user-specified precision (0-7 digits for fraction of second). Six to eight bytes depending on precision.

    datetimeoffset

    Defines a date that is combined with a time of a day that has time zone awareness and is based on a 24-hour clock. Similar to datetime2 with the addition of storing the offset from UTC from -14:00 to +14:00. Ten bytes.

    And, for comparison...

    datetime

    Defines a date that is combined with a time of day with fractional seconds that is based on a 24-hour clock. Date range is January 1, 1753, through December 31, 9999. Time range is 00:00:00 through 23:59:59.997 rounded to increments of .000, .003, or .007 seconds. Eight bytes.

  • Good question. A lot of people will like the separate date and time.

    :w00t:

  • Nice question...

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply