SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


New data types in SQL 2008


New data types in SQL 2008

Author
Message
bitbucket-25253
bitbucket-25253
SSCoach
SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)

Group: General Forum Members
Points: 16127 Visits: 25280
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

Before posting a performance problem please read
Joe Pattison
Joe Pattison
Old Hand
Old Hand (370 reputation)Old Hand (370 reputation)Old Hand (370 reputation)Old Hand (370 reputation)Old Hand (370 reputation)Old Hand (370 reputation)Old Hand (370 reputation)Old Hand (370 reputation)

Group: General Forum Members
Points: 370 Visits: 42
What is the DateTime2 and DateTimeOffset?
john.arnott
john.arnott
Hall of Fame
Hall of Fame (3.7K reputation)Hall of Fame (3.7K reputation)Hall of Fame (3.7K reputation)Hall of Fame (3.7K reputation)Hall of Fame (3.7K reputation)Hall of Fame (3.7K reputation)Hall of Fame (3.7K reputation)Hall of Fame (3.7K reputation)

Group: General Forum Members
Points: 3656 Visits: 3059
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.
OCTom
OCTom
SSCarpal Tunnel
SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)

Group: General Forum Members
Points: 4167 Visits: 4152
Good question. A lot of people will like the separate date and time.

w00t
Anipaul
Anipaul
SSCrazy Eights
SSCrazy Eights (9.9K reputation)SSCrazy Eights (9.9K reputation)SSCrazy Eights (9.9K reputation)SSCrazy Eights (9.9K reputation)SSCrazy Eights (9.9K reputation)SSCrazy Eights (9.9K reputation)SSCrazy Eights (9.9K reputation)SSCrazy Eights (9.9K reputation)

Group: General Forum Members
Points: 9873 Visits: 1407
Nice question...



Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search