Data type | Comments |
Time | Only keeps track of nanoseconds in a day. There is no reference to a date. Is stored using between 3 and 5 bytes. |
Date | Only keeps track of days, starting 01/01/01 to 31/12/9999. Takes 3 bytes for storage. |
SmallDateTime | Can 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. |
DateTime | Is 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. |
DateTime2 | Is 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. |
DateTimeOffset | Can be seen as a DateTime2 data type, but that takes timezone into account. |
Sources:
Comments