Docs
Browse Docs
Field guide · Dates and times

Mixed date formats

One column holds dates written in several different styles.

What it looks like

Before
signup_date
01/02/24
2024-01-02
March 4 2024
2-3-24
2024/02/03
After
signup_date
2024-01-02
2024-01-02
2024-03-04
2024-02-03
2024-02-03
Every value now uses one style, year first.

How it happens

  • The column was filled in by several people, each writing dates the way they learned to.
  • Rows were merged from systems that export dates differently.
  • A spreadsheet recognized some cells as dates and reformatted them, and left the rest as typed text.

What it breaks

  • Sorting puts rows in text order, so the tenth of a month can land before the second.
  • Date filters and date arithmetic silently skip every value they cannot read.
  • Importing into a database fails on the first row that does not match the expected style, or worse, loads it as empty.

How to spot it

  • Sort the column and read the first and last twenty values. Mixed styles cluster at the ends.
  • Count values by length. A clean date column has one length; a mixed one has several.
  • Look for separators: slashes, dashes, dots, and spelled-out months in the same column.

How to fix it

  • Choose one output style for the whole column. Year first (ISO 8601) sorts correctly as plain text and is read the same way everywhere.
  • Parse each value with the style it was actually written in, then write it back in the chosen style.
  • Set aside any value that could be read two ways instead of guessing. See ambiguous day and month order.

TermsISO 8601, Parsing, Standardization

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.