LibreOffice Calc · CSV import · Beginner
Stop CSV Codes Turning into Dates in LibreOffice Calc
Prevent codes such as 03-04 from turning into dates when importing CSV into LibreOffice Calc, without losing the original text.
Updated 10 October 2026 · Formula checks: testing standards
A value such as 03-04 may be a product revision, not a calendar date. When you import a CSV, LibreOffice Calc can try to recognize dates and numbers automatically. If that code becomes a date serial, you have lost its original meaning. Protect the code columns as Text before you finish importing.
Import ambiguous fields without conversion
- Use File → Open and select the original CSV file.
- Display Text Import; turn on Edit filter settings in the file-open dialog if needed.
- Choose the correct delimiter so the preview lines up into columns.
- Select the preview heading for each code column.
- Choose Text under Column type for codes such as
03-04,1/2and00051. - Check the preview; for actual dates, select the matching Date (YMD), Date (DMY), or Date (MDY) type where appropriate.
- Click OK and inspect a few results.
| Sample field | Meaning | Preferred type |
|---|---|---|
03-04 |
Part revision | Text |
00051 |
Account ID | Text |
2026-03-04 |
Invoice date | Date (when you need date calculations) |
Use the mixed codes and dates practice file to check that the two kinds of fields stay distinct.
What if the values have already changed?
Try Undo immediately. Otherwise, go back to the original CSV and reimport with the correct column type. Changing a converted date cell’s display format to Text often reveals its numeric date serial rather than its original spelling.
Verify a genuine date
If you imported 2026-03-04 as a date into B2, enter:
=ISNUMBER(B2)
A result of TRUE means B2 contains a number, which is how Calc normally represents dates. It does not by itself prove the date was interpreted correctly—confirm the displayed day, month and year too.
For dates accidentally stored as text, use the text-to-date conversion guide.
Common questions
Can I disable all date detection? Review Detect special numbers in Text Import, but explicitly choosing Text for identifier columns gives better control while keeping real dates usable.
Does CSV remember a column’s type? No. It is a text-based format; the receiving spreadsheet program decides how to interpret each field.
Official reference: LibreOffice Help. This tutorial focuses on LibreOffice Calc; menu names and behavior can vary by version, operating system and locale.