Data typeComments
TimeOnly keeps track of nanoseconds in a day. There is no reference to a date.
Is stored using between 3 and 5 bytes.
DateOnly keeps track of days, starting 01/01/01 to 31/12/9999.
Takes 3 bytes for storage.
SmallDateTimeCan be used to store dates between 01/01/1900 and 06/06/2079.
Also allow to keep track of time information till seconds.
Takes 4 bytes for storage.
DateTimeIs used to store date and time between 01/01/1753 to 31/12/9999.
Minimum unit of time it keeps is milliseconds with an accuracy of 3.33 ms.
Takes 8 bytes for storage.
DateTime2Is the most complete data type that is a real combination of Date and Time data types.
For this reason, it takes between 6 and 8 bytes for storage.
DateTimeOffsetCan be seen as a DateTime2 data type, but that takes timezone into account.


Last modified: April 25, 2019



Write a Reply or Comment