Blog

Inconsistent date columns in a parts CSV? Fixes

Learn why dates in a parts CSV sort or import incorrectly, how to standardize the values safely, and how to verify the corrected export.

Megan FosterTools and utilities 4 min read

A parts database export can look fine until dates sort out of order, fail to import, or show different days on another computer. A column might mix formats such as 2025-04-03 and 04/03/2025, or contain values that are not dates at all.

Before changing the file, check what each value means and what date format the destination database expects. You can inspect, find, edit, and sort a CSV with the browser-based CSV Editor. Your file stays on your device.

Check and correct the date column

  1. Make a copy of the original export. Keep it unchanged so you can restore the source values if an edit or import goes wrong.
  2. Open the CSV Editor and load the copied CSV. Find the parts date column, such as received_date, last_serviced, or purchase_date.
  3. Inspect several values from the beginning, middle, and end of the file. Compare them with a reliable source, such as the original order record, to establish whether the month or day comes first.
  4. Choose one format that the destination system accepts. If it supports ISO dates, use YYYY-MM-DD, for example 2025-04-03. Edit inconsistent or invalid cells to match the chosen format.
  5. Sort the date column and check whether the records fall in chronological order. Save the corrected CSV as a new file, then test that file with a small import before replacing the full database data.

Do not normalize values just because they look different. First confirm the intended date. The value 04/03/2025 could mean April 3 or March 4, depending on the source's regional settings.

What the date values mean

Dates look different but refer to the same day

Values such as 2025-04-03 and 4/3/2025 may both mean April 3, 2025. This is a formatting inconsistency if the meaning is known. Standardize the values to the destination's required format before importing.

Numeric dates could mean two different days

A value such as 03/04/2025 is ambiguous when you do not know whether the source uses month/day/year or day/month/year. Do not guess based on the computer you are using. Check the database export settings, a known parts record, or the system that originally created the date. If you cannot verify the meaning, leave the original unchanged and ask the data owner.

Some cells contain words or impossible dates

Entries such as unknown, pending, 2025-13-40, or a blank value are not valid dates in a consistent date column. Decide how the destination represents missing information. Use a blank or an approved status value, rather than inventing a date such as 01/01/1900.

Some values include a time

A column may mix date-only values with timestamps such as 2025-04-03 14:30. Check whether the database field is meant to hold a date or a date and time. Keep the time if it represents a meaningful event, and preserve any time zone information required by the destination system.

Sorting puts dates in an unexpected order

The values may be treated as text rather than dates. Text sorting can put 12/01/2024 before 2/15/2024 because it compares characters from left to right. A consistent year-month-day format sorts in chronological order as text, but confirm the receiving database recognizes that format as a date.

Fix the cause before importing again

  1. Confirm the source's date order. Check a record whose actual date you can verify, then compare it with the exported value. Do not use the computer's regional format as proof of how the file was created.
  2. Check the destination field requirements. Find out whether the database expects a date, a timestamp, or plain text, and which format it accepts. Use the same rule for every row in that column.
  3. Standardize the values. Use the CSV Editor to find and edit inconsistent entries. Avoid changing unrelated columns, and preserve any time or time zone information that matters to the parts record.
  4. Handle missing and invalid values deliberately. Use the database's approved blank or status value. If a date cannot be confirmed, flag it for review instead of filling in a guess.
  5. Check import interpretation. If the import process offers a date format or locale choice, select the format used in the corrected file. A correctly formatted CSV can still be misread if the importer assumes another regional date order.
  6. Validate the new file. Sort the corrected column, inspect the earliest and latest dates, and import a small sample first. Compare a few imported records against the source before updating the whole parts database.

Why a CSV can contain mixed dates

A CSV stores rows and columns as text. It does not attach a reliable date type to a value. One program may export a date as 2025-04-03, while another writes 4/3/2025 according to its regional settings. A spreadsheet can also display a date one way while saving a different representation in the CSV.

For that reason, check the text in the export rather than relying only on how a spreadsheet displays it. Also keep the untouched original: if an ambiguous date gets converted incorrectly, the source file is the best reference for recovering the data.

When the dates are standardized, keep the corrected export separate from the original until the database import has been checked.