CSVians AI / Guides
Fix date formats
One unambiguous format, zero silent day/month swaps.
Why dates are the riskiest column
“03/04/2026” means 3 April in most of the world and 4 March in the US. A tool that guesses silently can corrupt every ambiguous date in your file. The fix is not a smarter guess — it is you stating the source format explicitly.
A safe approach
- Inventory the formats first. Ask the chat what date formats appear in the column before changing anything.
- State the source order. “Dates in order_date are DD/MM/YYYY” removes all ambiguity.
- Pick one output format. ISO 8601 (YYYY-MM-DD) sorts correctly, is unambiguous, and is accepted by every database and spreadsheet.
- Handle the unparseable. Decide what happens to values like “unknown” or “32/13/2026”: leave them, blank them, or flag them. Never let them become a silent wrong date.
Example prompt
“Standardise order_date to YYYY-MM-DD. The source values are DD/MM/YYYY. Values that do not match that pattern should be left unchanged and listed so I can review them. Do not guess day/month order for ambiguous values.”
Watch for
- Two-digit years. “04/03/26” needs a century rule — state it.
- Excel serial numbers. A column of numbers like 45723 means the file was exported with dates as serials; mention it and they can be converted.
- Mixed formats in one column. Common after merging exports from two systems. Ask for per-format handling rather than one rule.
Verify
After running, check a few converted rows against the original, especially values where day ≤ 12 (the ambiguous ones). The Compare view shows original and cleaned side by side so every changed date is auditable.