Two-digit years
A year written as two digits does not say which century it belongs to.
What it looks like
Before
| birth_date | joined_date |
|---|---|
| 15-Mar-68 | 04-Sep-23 |
| 02-Jan-31 | 11-Sep-23 |
| 30-Jun-19 | 18-Sep-23 |
After
| birth_date | joined_date |
|---|---|
| 1968-03-15 | 2023-09-04 |
| 1931-01-02 | 2023-09-11 |
| needs a decision | 2023-09-18 |
How it happens
- Older systems and paper forms saved space by dropping the century.
- A spreadsheet display format showed two digits, and the file was exported as displayed.
- People type dates the short way when the century seems obvious to them at the time.
What it breaks
- Software picks a century using a cutoff rule, and different tools use different cutoffs, so the same file reads differently in each.
- Birth dates land in the future and ages come out negative, or a long-lived record appears a century younger than it is.
- Sorting and date ranges put the affected rows a hundred years away from their neighbors.
How to spot it
- Count values by length. A two-digit year makes the value shorter than a full date.
- After parsing, look for dates in the future in columns that should only hold the past, such as birth dates.
- Check the earliest and latest years. A gap of about a century between clusters is a sign.
How to fix it
- Use what the column means to limit the possible century. A birth date cannot be later than today, and a contract end date is rarely a century old.
- Compare against another date on the same row that the value must come before or after.
- Where both centuries remain plausible, send the row to a person instead of applying a cutoff.
- Write the result with a four-digit year so the question cannot come up again.
- Mixed date formatsOne column holds dates written in several different styles.
- Ambiguous day and month orderA date such as 03/04/2025 could mean March 4 or April 3, and nothing in the cell says which.
- Impossible datesA value is shaped like a date but names a day that does not exist or could not have happened.
TermsISO 8601, Parsing, Validation