Sub topic 6
The 1900 and 1904 date systems
This chapter assumes you can enter formulas, use cell references such as A2, and apply a number format. You should also know from earlier in the tutorial that Excel stores a date as a serial number, a count of days. Here you will learn that the count starts from a different day in each of two date systems. You will also learn why a workbook can show the right date in one file and a date four years off in another.
Two starting points for the count
A serial number is only meaningful relative to a starting day, called the epoch. Excel supports two epochs, and each workbook uses one of them.
| Property | 1900 date system | 1904 date system |
|---|---|---|
| Serial 0 | Displays as 0 January 1900 | 1 January 1904 |
| Serial 1 | 1 January 1900 | 2 January 1904 |
| Earliest date Excel will display | 1 January 1900 | 1 January 1904 |
| Latest date | 31 December 9999 (serial 2958465) | 31 December 9999 (serial 2957003) |
| Typical origin | Windows Excel, and Lotus 1-2-3 before it | Early Excel for Mac |
| Current default | Yes, on Windows and Mac | Only if the workbook was saved with it |
The 1900 system is the default in current versions of Excel on both Windows and Mac. The 1904 system exists because the first Macintosh versions of Excel used it. Older Mac workbooks, and files created from them, can still carry it.
The system is a property of the workbook, not of a cell or a worksheet. Every date in the file uses the same epoch.
The same date has two serial numbers
Here is the formula from the earlier chapter, which returns 45000 in a General-formatted cell in a 1900 workbook:
=DATE(2023,3,15)In a workbook that uses the 1904 system, the same formula returns 43538. The date is the same, but the count starts 1,462 days later, so every serial number is 1,462 smaller. You can see this by comparing the two epochs. Serial 1462 in the 1900 system is 1 January 1904, which is serial 0 in the 1904 system.
The offset is 1,462 days, not 1,461 (four years of 365 days, plus one). The reason is a quirk of the 1900 system, covered in the next section.
The phantom leap day of 1900
The year 1900 was not a leap year. Century years are leap years only if divisible by 400, so 2000 was a leap year and 1900 was not. But the 1900 date system treats 29 February 1900 as a real day, with serial number 60. Lotus 1-2-3 had this bug, and Excel copied it so that files moved between the two programs would keep their dates.
You can see it directly:
=DATE(1900,2,29)This returns 60 and displays as 29 February 1900, a day that never existed. The consequences are:
- Serial 59 is 28 February 1900. Serial 60 is the phantom day. Serial 61 is 1 March 1900.
- Every serial number from 61 onward matches the real calendar. Only the first 60 are shifted.
- Excel counts one more day between 1 January 1900 and 1 January 1904 than actually passed. That extra day is why the offset between the two systems is 1,462 and not 1,461.
WEEKDAYreturns wrong weekdays for dates before 1 March 1900. For example, 1 January 1900 was a Monday, but Excel reports Sunday.
The 1904 system never had this problem, because its epoch falls after the missing leap day.
What happens when the systems meet
The serial number is what travels between workbooks, not the date. If you copy a cell and the number lands unchanged in a workbook with a different epoch, the number is read against the new epoch and the date moves.
- A date from a 1900 workbook pasted into a 1904 workbook appears 1,462 days later. That is four years and one day.
- A date from a 1904 workbook pasted into a 1900 workbook appears 1,462 days earlier.
Changing the setting on an existing workbook causes the same shift. Excel does not rewrite the stored numbers, so every date in the file moves by four years and one day. Typed constants are shifted too, and so are dates that were entered as values rather than built with DATE. A formula such as =DATE(2023,3,15) still gives March 15, 2023, because it recomputes against the new epoch.
Checking which system a workbook uses
Look at the setting in the workbook, not at how the dates appear. In Excel for Windows, go to File > Options > Advanced, then scroll to the section "When calculating this workbook". The box "Use 1904 date system" is checked for the 1904 system. On Mac, the equivalent setting is in Excel > Preferences > Calculation, with the same checkbox name.
You can also test it with a formula. The formula below builds 1 January 1904 and compares its serial number with the 1900-system value:
=IF(DATE(1904,1,1)=1462,"1900 system","1904 system")In a 1900 workbook, 1 January 1904 is serial 1462, so the formula returns "1900 system". In a 1904 workbook it is serial 0, so the formula returns "1904 system". This test is safe in both systems. A test that built a date in 1900 would return #NUM! in a 1904 workbook, because that date is before the epoch.
Converting between systems
If dates have already shifted, adjust them by the offset. Assume column A holds numbers that were copied from a 1904 workbook into a 1900 workbook. Each date is 1,462 days too early, so put this in the next column:
=A2+1462Format the result as a date. In the opposite direction, from a 1900 workbook into a 1904 one, subtract 1,462:
=A2-1462Apply this to real dates only. Blank cells would become 1462 or -1462, and text dates would give #VALUE!, so wrap the conversion in a test such as IF(ISNUMBER(A2), A2+1462, "").
Effects on the functions in this tutorial
The functions you learned earlier work in either system, because they take and return serial numbers in the workbook's own epoch.
DATE,TODAY,EDATE, andEOMONTHreturn the correct calendar date in both systems. Only the underlying serial number differs.- Subtracting two dates gives the same day count in both systems, as long as both dates are in the same workbook and after 28 February 1900.
DATEDIFgives the same results, with the same limit that the start date must not be later than the end date.- Fractions of a day for time of day are unaffected. Noon is 0.5 in both.
The risk is not in the functions. It is in combining values from different workbooks, where one serial number is read against two epochs.
For example, a date copied as a value from a 1904 workbook into a 1900 workbook gives a wrong result when you subtract it from TODAY():
=TODAY()-A2The formula runs without an error and returns a number that is 1,462 days too large. This is the typical failure: nothing looks broken, and every number is plausible but off.
Edge cases to remember
- Dates earlier than the epoch show as a row of
#characters, or as#NUM!when a function builds them. That is 1 January 1900 in the 1900 system and 1 January 1904 in the 1904 system. - A negative result from date arithmetic is a valid number, but formatting it as a date also shows
#. Format it as General to read the difference. - Linking to a cell in another workbook that uses a different system can produce a shifted date. Test one known date after creating the link.
- Data exported to CSV carries text dates, not serial numbers, so the system matters only when the text is converted back. Chapter 14 covers text dates.
- A workbook created from a Mac template that uses 1904 can pass the setting along to workbooks derived from it. Check new files built from old ones.
Exercise
A workbook that uses the 1900 date system has the number 43538 in cell A2, copied as a value from a 1904-system workbook. Which date does the cell really hold, and what formula gives the correct serial number for the 1900 workbook?
Show answer
In the 1904 system, 43538 is 15 March 2023. In the 1900 system it needs the 1,462-day offset added, so use =A2+1462, which returns 45000. Format the result as a date.
Exercise
Why is the offset between the two systems 1,462 days and not 1,461, which is four years of 365 days plus one leap day?
Show answer
The 1900 system counts 29 February 1900 as a real day (serial 60), though 1900 was not a leap year. That extra phantom day adds one more day to every serial number from 61 onward, so the offset between the systems is 1,462 days.
Exercise
What does =IF(DATE(1904,1,1)=1462,"1900 system","1904 system") return in a workbook with "Use 1904 date system" checked, and why?
Show answer
It returns "1904 system". In that workbook, 1 January 1904 is serial 0, not 1462, so the comparison is false.