Docs
Browse Docs
Field guide · Dates and times

Two-digit years

A year written as two digits does not say which century it belongs to.

What it looks like

Before
birth_datejoined_date
15-Mar-6804-Sep-23
02-Jan-3111-Sep-23
30-Jun-1918-Sep-23
After
birth_datejoined_date
1968-03-152023-09-04
1931-01-022023-09-11
needs a decision2023-09-18
A birth date cannot fall after the date someone joined, which settles the first two rows. The third could be a small child or a very old member, and the cell cannot say which.

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.

TermsISO 8601, Parsing, Validation

Karg checks for many of these when it profiles a file, applies the fixes it is confident about, and sets the rest aside for your review. See how it works, or have our team clean your data for you.