New Tool Radar

AI for Data & Spreadsheets

How to Check Two-Digit Years in Excel for the Century They Were Interpreted As

Check two-digit years in Excel for the century they were interpreted as.

Schematic with three steps: Show the full year of each date; Compare each full year with the intended; Re-enter the wrong dates with four-digit years.

Excel reads a two-digit year by a rule: 00 to 29 become 2000 to 2029, and 30 to 99 become 1930 to 1999. A date typed as 5/28/31 is therefore 1931, not 2031, and a birth year of 98 is 1998, which may be right, while a start year of 31 meant as 2031 is a century out. Check the full year of every two-digit date before it enters an age or a deadline calculation.

What you need

  • Excel with dates entered with two-digit years
  • The intended full year for each date, from the source
  • A helper column to show the full year

Step 1: Show the full year of each date

In a helper column, enter =YEAR for each date to show the full four-digit year Excel assigned. Write the years down next to the dates as typed.

Step 2: Compare each full year with the intended year

Compare the YEAR result with the year the date was meant to have. Any date where the two differ by a century is an interpretation error; mark it for fixing.

Step 3: Re-enter the wrong dates with four-digit years

Re-enter each wrong date with the full four-digit year, for example 2031 instead of 31, and re-check the YEAR result. Agree that all future dates in the sheet use four-digit years.

Worked example: synthetic date list with two-digit years

The table below is a synthetic example. It shows the expected result of a two-digit-year check; no workbook was opened.

Date as typed Year Excel assigns Intended year
5/28/19 2019 2019
3/14/31 1931 2031
11/02/98 1998 1998
7/04/29 2029 2029
Dates needing a fix 1 3/14/31 only

Expected result (UNTESTED). 3 of 4 two-digit years are interpreted as intended, but 3/14/31 becomes 1931 instead of the intended 2031. Re-entering it as 3/14/2031 fixes the century. This check was not run live; the table shows the expected result for the synthetic example.

Limits

  • The 00 to 29 and 30 to 99 rule is fixed in Excel; a date of 30 will always become 1930, not 2030.
  • A two-digit year in a text-formatted cell follows the same rule when it is used in a function.
  • Windows region settings can change the two-digit-year window for all programs, so the same file can read differently on another computer.
  • A date displayed with a two-digit year hides the century; format the column to show four-digit years while checking.

Sources

See all