Date parsing error, importing CSV

Do you want to: Report a bug
OS version: Win 10 Pro 22H2
App version: 8.0.1.31 (x64)
Downloaded from: ONLYOFFICE website
Additional information: Australian Region setting

In Australia, date format is typically dd/mm/yyyy

And when importing a CSV file created by one of the banks I use, some of the file had the following date data;

16/05/2024
15/05/2024
13/05/2024
13/05/2024
09/05/2024
08/05/2024
03/05/2024
03/05/2024
03/05/2024
03/05/2024
03/05/2024
02/05/2024
01/05/2024
29/04/2024
29/04/2024
29/04/2024

I pared away the other columns as they contain personal financial information.

When OO displayed the data in the spreadsheet, it was rendered as;

16/05/2024
15/05/2024
13/05/2024
13/05/2024
05.09.2024
05.08.2024
05.03.2024
05.03.2024
05.03.2024
05.03.2024
05.03.2024
05.02.2024
05.01.2024
29/04/2024
29/04/2024
29/04/2024

Not only is the middle set of data delimited with a period instead of a slash character, the day and month data was reversed, corrupting the data.
In effect, a date of the 3 May 24 was changed to 5 March 24, not helpful for financial reconciliation.

It looks like the date parser for CSV is assuming a US date format, but since some of the records contain a 13th, 15th, 16th, or 29th month in the US date format, it rendered those correctly as day, but the others were passed as the US date format as the data could support it.

IT would be helpful of the date parser paid attention to the regional settings of the OO application rather than assuming a US regional format.

Thanks, Team!

Ah! I’ve just noticed that this issue was reported as well.

with a work-around

which does appear to work. And hopefully will be resolved in version 8.1

Hello @DavidRGreen

I’d like to inform that this issue will be fixed in upcoming version 8.1.

1 Like

Nope, it doesn’t.

I use OnlyOffice 8.1.1 on macOS 12.7.5

Here’s the content of the csv file (utf-8 / CRLF):

Expected date;Y-M-D;Y-D-M;D-M-Y;Y/M/D;Y/D/M;D/M/Y
“-> 28 October 2024”;2024-11-28;2024-28-11;28-11-2024;2024/11/28;2024/28/11;28/11/2024
“-> 8 April 2023”;2023-04-08;2023-08-04;08-04-2023;2023/04/08;2023/08/04;08/04/2023
“-> 22 July 1994”;1994-07-22;1994-22-07;22-07-1994;1994/07/22;1994/22/07;22/07/1994

dates.csv (309 Bytes)

And here’s what OO parsed:

So, as you can see, every parsed dates are wrong. Dates in DD-MM-YYYY format look right but in fact are not recognized as dates at all.

I imported (copy & paste) the test data from my earlier post into OO, and it was parsed as expected.

@Kroc I am not surprised that it struggled with your test data given the number of date format changes; however…

OO Dates

by applying custom date formatting to some of the relevant columns, marked as “custom”, the data was straightened out, excepting the 8 April 2023 row where day 08 and month 04 are both under 12, so the date parser could not accurately distinguish them apart.

I would suggest that if it is needful to display dates in multiple format standards on the one worksheet, it may be better to supply the dates in a format that is not ambiguous, like the internal date number, ie. 8 April 2023 which is 45024, or the Unix time code, but that would require a formula to convert to the internal date number.

… also, your expected October date row has November date data.

The October / November error was a typo when I prepared this sample file. My bad.

Getting working data on my side is not difficult. What we need is that OO works with all date formats encoutered in CSV files like Excel does, not only one.

Maybe an optional step in which we could indicate the type and structure of the CSV columns would do the job?