|
|
|
SSCertifiable
       
Group: General Forum Members
Last Login: Today @ 9:12 PM
Points: 5,103,
Visits: 20,208
|
|
|
|
|
|
Old Hand
      
Group: General Forum Members
Last Login: Tuesday, December 08, 2009 9:03 AM
Points: 336,
Visits: 42
|
|
| What is the DateTime2 and DateTimeOffset?
|
|
|
|
|
UDP Broadcaster
      
Group: General Forum Members
Last Login: Wednesday, April 17, 2013 10:57 PM
Points: 1,491,
Visits: 3,008
|
|
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.
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Today @ 12:56 PM
Points: 2,017,
Visits: 2,850
|
|
Good question. A lot of people will like the separate date and time.
|
|
|
|
|
SSCarpal Tunnel
       
Group: General Forum Members
Last Login: Yesterday @ 1:35 AM
Points: 4,789,
Visits: 1,336
|
|
|
|
|