https://bugs.documentfoundation.org/show_bug.cgi?id=170107

            Bug ID: 170107
           Summary: Many text strings dates formats recognized by Excel
                    are not parsed by LibreOffice Calc's DATEVALUE
                    function
           Product: LibreOffice
           Version: Inherited From OOo
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Calc
          Assignee: [email protected]
          Reporter: [email protected]

Created attachment 204779
  --> https://bugs.documentfoundation.org/attachment.cgi?id=204779&action=edit
Sample file

I wanted to parse a bunch of cells (from a CSV) that have text contents like
"22 Dec 2024", but Calc's "DATEVALUE" function doesn't handle that. As it turns
out, Calc's DATEVALUE function doesn't handle most formats that Excel would
recognize, either.

>From the table in
https://support.microsoft.com/en-us/office/datevalue-function-df8b07d4-7761-4a93-bc33-b7471bbff252
we can see a couple of examples of expected formats to be supported.

For easy testing:

=DATEVALUE("8/22/2011")
=DATEVALUE("22-MAY-2011")
=DATEVALUE("2011/02/23")
=DATEVALUE("5-JUL")
=DATEVALUE(A2 & "/" & A3 & "/" & A4)
=DATEVALUE("22 Dec 2024")
=DATEVALUE("22-DEC-2024")

…the only one that works is the first one, "8/22/2011" parsed as "2011-08-22".
All the others show "Err:502" in the cell.

I have created and attached a sample file that demonstrates the problem, with
their formats and mine.

With the same sample file, Gnumeric has no problem parsing these formats.

---

Observed on:

Version: 25.8.4.2 (X86_64) / LibreOffice Community
Build ID: 290daaa01b999472f0c7a3890eb6a550fd74c6df
CPU threads: 8; OS: Linux 6.17; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Flatpak
Calc: threaded

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to