Bug 156886 - Calc fails to format date as requested
Summary: Calc fails to format date as requested
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.6.0.3 release
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-08-23 23:30 UTC by Bogaboga Man
Modified: 2023-08-24 22:06 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Test Spreadsheet file (25.11 KB, application/vnd.oasis.opendocument.spreadsheet)
2023-08-23 23:33 UTC, Bogaboga Man
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bogaboga Man 2023-08-23 23:30:28 UTC
Description:
Calc adding an "'" to the date on date format change, fails to format date, which when removed, formatting happens as initially expected.

Steps to Reproduce:
1. Have a date in LibreOffice Calc appear as 1/3/2023.
2. Right click the cell
3. Click Format Cells
4. Choose Date and select the type of format (I chose the format D. MMM. YYYY)
5. Click OK.

Actual Results:
LibreOffice Calc adds a "'" to the beginning of the date cell value (not visible at first), and does nothing requested. When this "'" is removed, date is formatted as initially expected.

Expected Results:
It should have changed the "1/3/2023" date format to "03 January 2023"


Reproducible: Always


User Profile Reset: Yes

Additional Info:
Same applies to multiple date selections and custom date formats
Comment 1 Bogaboga Man 2023-08-23 23:33:06 UTC
Created attachment 189121 [details]
Test Spreadsheet file
Comment 2 m_a_riosv 2023-08-24 21:26:19 UTC
There is not a bug.

Seems the date were wrongly imported.

For dates that can be misinterpreted as dd/mm/yyyy or mm/dd/yyyy, a "'" it's added to mark it as text like '1/3/2023, for those that cannot the single quotation is not needed.

Please add your question in https://ask.libreoffice.org/c/english/5
Comment 3 ady 2023-08-24 22:06:13 UTC
FWIW, if this happens when importing from a csv, the import dialogue allows to select each column and set the format, for example as d/m/y (or similar), among other possibilities and options.