[ACCEPTED]-What is the internal representation of datetime in sql server?-internal-representation

Accepted answer
Score: 18

It's stored as an 8 byte field, capable of a range from 1753-01-01 12 through 9999-12-31, accurate to 0.00333 11 seconds.

The details are supposedly opaque, but 10 most resources (1), (2) that I've found on the 9 web state the following:

The first 4 bytes 8 store the number of days since SQL Server's 7 epoch (1st Jan 1900) and that the second 6 4 bytes stores the number of ticks after 5 midnight, where a "tick" is 3.3 4 milliseconds.

The first four bytes are signed 3 (can be positive or negative), which explains 2 why dates earlier than the epoch can be 1 represented.

More Related questions