Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

New data types in SQL 2008 Expand / Collapse
Author
Message
Posted Wednesday, October 1, 2008 9:43 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Yesterday @ 6:24 PM
Points: 5,613, Visits: 25,181
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
Post #579471
Posted Thursday, October 2, 2008 7:00 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Tuesday, December 8, 2009 9:03 AM
Points: 336, Visits: 42
What is the DateTime2 and DateTimeOffset?
Post #579616
Posted Thursday, October 2, 2008 7:56 AM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Thursday, August 28, 2014 8:53 PM
Points: 1,521, Visits: 3,039
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.


Post #579658
Posted Thursday, October 2, 2008 11:30 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Yesterday @ 12:35 PM
Points: 2,576, Visits: 3,827
Good question. A lot of people will like the separate date and time.

Post #579842
Posted Friday, October 3, 2008 1:59 AM
SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Wednesday, September 10, 2014 3:19 AM
Points: 5,363, Visits: 1,391
Nice question...


Post #580120
Posted Wednesday, August 27, 2014 8:30 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Yesterday @ 4:39 PM
Points: 2,849, Visits: 231
Thanks for the question. Needed the refresher.
Post #1607857
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse