The DATE Type
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer

The DATE Type

The DATE type is implemented using an 8-byte floating-point number. Days are represented by whole number increments starting with 30 December 1899, midnight as time zero. Hour values are expressed as the absolute value of the fractional part of the number. The following table illustrates this.

Date and time Representation
30 December 1899, midnight 0.00
1 January 1900, midnight 2.00
4 January 1900, midnight 5.00
4 January 1900, 6 A.M. 5.25
4 January 1900, noon 5.50
4 January 1900, 9 P.M. 5.875

So, the DATE date type, and also the COleDateTime class, represent dates and times as a classic number line.

However, there are discontinuities for dates before 30 December 1899. See the following table for an illustration.

Date and time Representation
30 December 1899, midnight 0.00
29 December 1899, midnight -1.00
18 December 1899, midnight -12.00
18 December 1899, 6 A.M. -12.25
18 December 1899, noon -12.50
18 December 1899, 6 P.M. -12.75
19 December 1899, midnight -11.00

See Also

Date and Time

Show:
© 2016 Microsoft