How to Fix Mixed Date Formats in a CSV (With Examples)
A date column with five different layouts breaks sorting, joins and imports. Here is how to fix it.
Dates in real files are messy. One column can hold 2026-03-09, 09/03/2026, 3/9/26, March 9, 2026, 9 Mar 2026, 20260309 and even a number such as 46090 that Excel uses for dates. A database import will reject some of these, and sorting puts them in the wrong order.
We tested the Data Utility Change date format step on exactly these values. All of them became 2026-03-09. The Excel number 46090 was read as a date, a ten-digit unix time was read as seconds, a thirteen-digit one as milliseconds, and a value with a time, such as 2026/03/09 14:30, kept its time when you choose a format that includes it. Values that are not dates, such as the word oops, or impossible dates such as 31/02/2026, were left unchanged, so nothing is lost.
The hard part is a date like 03/04/2026, which could be 3 April or March 4. The tool cannot know, so you choose: day first or month first. In our test, month first gave 2026-03-04 and day first gave 2026-04-03. A date like 13/03/2026 is only valid as day first, so it is always read correctly. If your file comes from one country, one choice is usually right. Check a few rows after the change.
You can also get just a part of the date: the year, month number, month name, day, weekday or quarter, into the same column or a new one. This is handy for reports and pivot tables. Every date step is recorded in Data Lineage, with the format and the day-first setting.
Related tool pages
- Change Date Format in a CSV File: Change the date format of a column in a CSV or Excel file, for example 09/03/2026 to 2026-03-09, or get only the year or month. Free, in your browser.
- Convert Excel Date Numbers to Dates: Turn Excel date numbers such as 46090 and unix timestamps into readable dates in a CSV or Excel file. Free, and your file stays in your browser.
- Join Two CSV Files on a Key: Join two CSV or Excel files on a key column with an inner, left, right or full join. Free, and your files stay in your browser.
- Merge CSV Files by a Common Column: Merge two CSV files into one by matching a common column such as id or email. Choose inner, left, right or full. Free, in your browser.
- VLOOKUP Alternative for CSV and Excel Files: Look up values from one file in another without VLOOKUP. Join two CSV or Excel files on a key and add the columns you need. Free, in your browser.
- Join Two Excel Files on a Key Column: Join two Excel files on a key column and download the combined result as Excel or CSV. No formulas, free, and your files stay in your browser.
How to use the Data Transformation: step by step
- Open Data Transformation and load your file.
- Add a Change date format step.
- Pick the column, the new format and day or month first.
- Check the preview and download the file.
When to use the Data Transformation
- Prepare a file for a database import
- Sort a column of mixed dates correctly
- Turn Excel date numbers into dates
- Add a year or quarter column for a report
Example
Input: plans.csv + customers.csv, key = id
Output: id, first_name, plan, amount
Frequently asked questions
Which transformations are available?
Join with a second file (inner, left, right, full), trim spaces, concatenate columns, change case, find and replace, split a column, rename, remove columns, filter rows, remove duplicates, sort and fill empty cells.
Can I run several steps?
Yes. Steps run from top to bottom and each one sees the result of the one before. You can reorder or remove them.
Can I join two files or combine columns?
Yes. Data Transformation lets you join two CSV or Excel files on a key (inner, left, right or full), and trim spaces, concatenate columns, change case, find and replace, split, rename, filter, sort, remove duplicates and fill empty cells. You choose the steps, check the result and download it. Your files stay in your browser.
Can I change the date format of a column?
Yes. Add a Change date format step, pick the column and the new format, such as 2026-03-09, 09/03/2026 or March 9, 2026. It reads many layouts, Excel date numbers and unix timestamps, and can also give only the year, month, weekday or quarter. If 03/04/2026 is unclear, you choose day first or month first.
Tip: Write the result to a new column the first time, so you can compare it with the original before you replace anything.