Docs
Browse Docs
Field guide · Dates and times

Date and time split or merged

Some rows keep the date and the time in separate columns and others pack both into one.

What it looks like

Before
visit_datevisit_timevisit_at
2024-05-0314:30·
2024-05-03 09:15··
2024-05-042:05 PM·
2024-05-05··
After
visit_datevisit_timevisit_at
2024-05-0314:302024-05-03T14:30
2024-05-0309:152024-05-03T09:15
2024-05-0414:052024-05-04T14:05
2024-05-05··
The last row never had a time. It is left empty instead of being given midnight.

How it happens

  • Two systems were combined, one with a single timestamp field and one with separate date and time fields.
  • A form changed partway through its life, and old rows kept the old layout.
  • People typed the time into the date cell when the time column was hidden or missing.

What it breaks

  • Sorting by the date column alone puts events on the same day in the wrong order.
  • A date column that sometimes includes a time is read as text, so date filters skip those rows.
  • A missing time is filled in as midnight, which looks like a real reading and distorts anything measured by hour.

How to spot it

  • Count values by length in the date column. Rows that include a time are longer.
  • Check whether the time column is empty exactly where the date column is long.
  • Look for a large number of events at exactly midnight. Real activity rarely clusters there.

How to fix it

  • Decide the shape you need: one combined timestamp, separate columns, or both.
  • Split packed values so each column holds only its own part, and write times in one style.
  • Build the combined value only where both parts exist. Do not invent a time for rows that have only a date.

TermsTimestamp, Parsing, ISO 8601, Schema

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.