DATE silently changes invalid months, days, and years 0–1899 — Google Sheets fix
Updated
You type =DATE(24,1,1) expecting 1 January 2024, and the cell is 1 January 1924. You type =DATE(2023,2,30) expecting an error for a day that does not exist, and the cell is 2 March 2023. There is no red triangle. Official Help states that DATE “will silently recalculate numeric dates which fall outside of valid month or day ranges,” and that for years 0 through 1899, Sheets “adds that value to 1900.”
This page is those silent rules. A date stored as left-aligned text is dates stored as text. EOMONTH #NUM! on an impossible serial is EOMONTH #NUM!. EDATE clipping 31 January to the last day of February is EDATE wrong date. Keep the Google Sheets UI in English. File → Settings → Locale → United States so the dates below match the official examples’ month-first display.
Official Help: DATE.
Recreate it on a blank sheet
Section titled “Recreate it on a blank sheet”- Open a blank spreadsheet. File → Settings: display language English, Locale United States. In A1 type
formula. In B1 typeresult. In C1 typeas_text.
A legal date, as control. In A2 type ok. In B2 enter =DATE(2024,1,15). Format B2 as a date if you only see a serial. B2 is 1/15/2024. In C2 enter =TEXT(B2,"yyyy-mm-dd"). C2 is 2024-01-15. Leave B2 as the control.
A two-digit year is 1900 plus that number. In A3 type two_digit. In B3 enter =DATE(24,1,1). B3 is 1/1/1924, not 1 January 2024. In C3 enter =TEXT(B3,"yyyy-mm-dd"). C3 is 1924-01-01. Official Help’s own example is DATE(119,2,1) → 2/1/2019. In B4 enter =DATE(119,2,1). C4 =TEXT(B4,"yyyy-mm-dd") is 2019-02-01. Leave B3 as 1924. There is no triangle.
An illegal month rolls forward. In A6 type month13. In B6 enter =DATE(1969,13,1). Official Help: this is 1/1/1970, not an error. In C6 enter =TEXT(B6,"yyyy-mm-dd"). C6 is 1970-01-01. Leave B6 as that New Year’s date.
An illegal day rolls forward. In A7 type jan32. In B7 enter =DATE(1969,1,32). Official Help: this is 2/1/1969. C7 =TEXT(B7,"yyyy-mm-dd") is 1969-02-01. In A8 type feb30. In B8 enter =DATE(2023,2,30). 2023 is not a leap year, so February has 28 days. Day 30 is two days past that, and B8 is 3/2/2023. C8 is 2023-03-02. Leave B8 as 2 March. No triangle.
Decimals are truncated, not rounded. In A10 type decimal. In B10 enter =DATE(2024,12.75,15). Official Help: a month of 12.75 is interpreted as 12. B10 is 12/15/2024, not mid-December rounded up, and not January 2025. C10 is 2024-12-15. Leave B10 as 15 December.
Only an impossible year is #NUM!. In A12 type year_num. In B12 enter =DATE(-1,1,1). Official Help: years less than 0 or greater than 10000 return #NUM!. Hover B12 and capture the live English tooltip. Leave B12 broken. In B13 enter =DATE(10000,1,1) as a second #NUM! if you want both bounds on the sheet. DATE(0,1,1) is not this error: year 0 is in the 0–1899 window and becomes 1900.
What is actually wrong
Section titled “What is actually wrong”DATE(year, month, day)builds a date from three numbers. It does not validate thatmonthis 1–12 or thatdayexists in that month. Official Help: values outside those ranges are silently recalculated.DATE(1969,13,1)is 1 January 1970.DATE(1969,1,32)is 1 February 1969.- The same rule is why
DATE(2023,2,30)is 2 March 2023. The function added the leftover days to the next month. It did not “fix” 30 February. A leap year changes the landing:DATE(2024,2,30)is 1 March 2024, because 2024 has a 29 February. - Official Help: between years 0 and 1899, Sheets adds the number to 1900.
DATE(24,1,1)is 1924.DATE(119,2,1)is 2019. Years 1900 to 9999 are used as written.DATE(2024,1,1)is 2024. - Official Help: decimal parts of the inputs are truncated.
12.75is month 12, not 13. - Official Help: years below 0 or above 10000 are
#NUM!. That is the only official error branch on this page. B8 and B3 have no triangle. DATEof a text year or month is a different error: official Help says a string input is#VALUE!. That family is wrong type. Do not change locale to “repair” B3;24is already a number.
This is not dates stored as text. B3 and B8 are real date serials. They are just not the calendar days people meant.
This is not EOMONTH #NUM!. EOMONTH refuses an impossible serial and an overflowing month count. DATE rolls months and days instead of refusing them. The eomonth page already uses DATE(2024,13,1) as a one-line contrast. This page is that rule, plus the 0–1899 year offset.
This is not EDATE wrong date. EDATE of 31 January plus one month stays in February (last valid day). DATE(2024,2,31) leaves February and lands in March. Overflow and clip are different contracts.
Leave B3 as 1924 and B8 as 2 March 2023. They are the definitions. Leave B12 as #NUM!.
Write the four-digit year you mean. In E3 enter =DATE(2024,1,1). E3 is 1/1/2024. If the year arrives as two digits in a cell, add 2000 yourself only when that is actually the rule (=DATE(2000+F3,1,1) for values you have already checked are 0–99 and meant as 2000–2099). Do not pass 24 to DATE and hope.
Do not use DATE as a validator. If a month or day comes from a form and must exist, test it before you accept the date: compare =DATE(Y,M,D) with =DATE(Y,M,1) and the real last day, =EOMONTH(DATE(Y,M,1),0), and reject a day past that last day. A result that formats as a date is not proof that the inputs were valid.
Show the ISO date next to the result. Keep a TEXT(...,"yyyy-mm-dd") helper, as in column C, so 1924 cannot hide inside a format that drops the century.
Decimals. If a month is computed, wrap it in INT or ROUND on purpose. DATE will not round 12.75 up to January.
Do not wrap B3 or B8 in IFERROR. There is no error. See IFERROR hides cause. Do not wrap B12 in IFERROR and call the year valid; official Help rejects that year.
If DATE of a two-digit year is in the 1900s, the year was added to 1900. If DATE of day 30 or 32 landed in the next month, the day overflowed. If the cell is #NUM!, the year is outside 0–10000. If the cell is #VALUE!, one of the arguments was text: that is not this page.