Calendar dates don't display properly

Calendar dates don’t sort or display correctly when importing CSV files. Example:

|31/10/2025|05:50:12|PDT|
|31/10/2025|05:50:12|PDT|
|31/10/2025|05:50:12|PDT|
|2025-03-11|08:57:41|PST|
|2025-10-11|18:45:29|PST|
|13/11/2025|09:53:13|PST|
|2025-03-12|15:55:14|PST|
|2025-03-12|15:55:14|PST|
|2025-03-12|15:55:14|PST|

This bug has been there for at least 10 years. Is there anyway that it can be sorted out properly? The end result works OK, but it’s really clumsy to work with (and doesn’t impress the clients!)

I don’t think it’s a bug, but rather a matter of selecting the right options.

Thanks for the interest. The basic text import appears to be OK, all in correct order, everything in order - but in “MDY” format (which is in itself clumsy to work with). It’s after L/O “YMD” display format is selected that the resulting display is as you see it. In other words, L/O mucks it up after changing the display format. It appears to be that the underlying tools are mostly unchanged since OO/LO took over the application from Oracle/Sun 25 or so years ago. I’m guessing that since the Europeans never use ISO dates that perhaps they’ve never noticed that something’s out of date! FWIW, Excel can manage the task, but I prefer using L/O (except for this bug). I just don’t know how to bring it to the attention of the boffins in the back room.

My solution is to do all the work in L/O, save the file, and then open it in Excel so it displays correctly. But it should be fixed.

What exactly is your locale; what exactly do you choose in Text Import dialog; and what is the exact problem you see after that - with screenshots? Up to now, you provide “analysis”, but no description of the problem (I do specifically this, and I get that).

You wrote several times: “format”. Once it even was “YMD” display format - and that seems to tell that you think, that in the import dialog, you ignore the words “Column type”, and imagine that you set up there some “display” settings. No you do not. In the import dialog, you only tell Calc how to import - meaning “detect parts of the date in the text of the CSV”; and all formatting will happen only after the import, in the normal UI. If you choose the correct settings, the dates will be detected correctly: the ISO dates are always detected, when you check the “Detect special numbers” checkbox in the dialog; and the non-ISO dates like “31/10/2025” require the “DMY” in the respective column (not because you want them to display that way, but because you want Calc to know, that in those dates in the CSV, the first part is day, then month, then year).

With those settings, you get a column with differently formatted dates, but all are dates, and will sort correctly (as dates, not as text); and you would also be able to format them uniformly - by configuring cell format (or better style).

No, the change in formatting only reveals, where the import was not done right. For education try to set the column to a simple number: Values importrs as text/string will not follow. “True” dates will show a number of days since beginning of the 20th century (I skip details).
.
The other rule to notice is: Format will never change a type of data, only what is shown. (So a phone “number” as text +4912346 or 00111344 will not change.)

and users and developers at Sun / Oracle never stumbled over this after they bought StarOffice? Nobody noticed until now?
.
“Europe” is using iso-date for the same purpose as americans: You can easily sort the textual representation of dates.

1 Like

One import step missaed… The date column is still in Text format

  • in the text import dialog find the date column in the import preview at the bottom.
  • select the date column and then select Column type: Date(D/M/Y) This converts the column data from text with format “dd/mm/yyyy” to the default date format (probably “mm/dd/yy”). You can change the date format using the regular “format cells” method after importing.

This can also be done after the import by selecting the date column then:

  • goto Data tab menu
  • select “Text to columns”
  • in the dialog window, follow the process described above

Are you sure? The imported column shown in the screenshot by @mariosv is adjusted to the right, while text would be left-aligned.
.
The key point in the screenshot is the “detect special numbers”. The other selicting a locale fitting to the dates, not in iso-format.