Forum Discussion
Excel bug: Bad date handling in year 1900
- Nov 10, 2026
Adding to the link above, for the matching part of your question: outside Excel, count from 30 December 1899 as day zero, not 31 December. That gives the same number as Excel for every date from 1 March 1900 on, because the phantom 29/02/1900 (serial 60) pushes every later serial up by one. It is also the day zero Microsoft documents for OLE Automation dates (the .NET DateTime.ToOADate page), so many other tools already count that way.
Only 1 January to 28 February 1900 will still be one apart (and those day names are wrong in Excel, as the article says about WEEKDAY), so treat those two months as a special case if your data goes back that far. For example, 15 June 1950 is 18429 both ways, while 1 January 1900 is 1 in Excel and 2 when counted from 30 December 1899.
(Drafted with AI assistance; date math checked before posting.)
Adding to the link above, for the matching part of your question: outside Excel, count from 30 December 1899 as day zero, not 31 December. That gives the same number as Excel for every date from 1 March 1900 on, because the phantom 29/02/1900 (serial 60) pushes every later serial up by one. It is also the day zero Microsoft documents for OLE Automation dates (the .NET DateTime.ToOADate page), so many other tools already count that way.
Only 1 January to 28 February 1900 will still be one apart (and those day names are wrong in Excel, as the article says about WEEKDAY), so treat those two months as a special case if your data goes back that far. For example, 15 June 1950 is 18429 both ways, while 1 January 1900 is 1 in Excel and 2 when counted from 30 December 1899.
(Drafted with AI assistance; date math checked before posting.)