Description: After saving a file the date format of cells that have a different date format are changed back to mm-dd-yy. Date format given: mm/dd/yy. Cal version 7.4.0.2 (not shown in list below) on debian. File format xlsx. Steps to Reproduce: 1. Format cell to date format mm/dd/yy. 2. Save file. 3. Open file. 4. Date changed back to mm-dd-yy. Actual Results: Date format not saved. Expected Results: Date format preserved when saving. Reproducible: Always User Profile Reset: No Additional Info: Preserve the date format given.
Works for me with: Version: 24.2.0.0.alpha1+ (X86_64) / LibreOffice Community Build ID: 0ddd9f7e055a0c1ecb120de3e40c3fdb8373e9dc CPU threads: 16; OS: Windows 10.0 Build 22631; UI render: Skia/Vulkan; VCL: win Locale: es-ES (es_ES); UI: en-US Calc: CL threaded Please attach a sample file, and paste the information in Menu/Help/About LibreOffice, there is an icon to copy.
Created attachment 191354 [details] Sample file As requested.
Version: 7.0.4.2 Build ID: 00(Build:2) CPU threads: 4; OS: Linux 5.10; UI render: default; VCL: gtk3 Locale: en-PH (en_PH.UTF-8); UI: en-US Debian package version: 1:7.0.4-4+deb11u7 Calc: threaded
Those figures are not true spreadsheet dates but text dates. Use Menu/Data/Text to column to convert them in true dates, and format as you like. Doing so works fine for me.
I don't get it. It doesn't work for me. I don't see a menu Data->Text. And whatever I do, the same thing happens. Even if it is what you say it would still be a bug to me, as when I format a cell as a date with a specific format I would expect that format to be preserved.
Liked you or not it is not a bug. Your dates are text dates, so the cell format doesn't change how they are shown. Select the range with dates. Menu/Data/Text to column. Click on data column head. In column type, select DD/MM/YY. Now change the format as you like. https://ask.libreoffice.org/t/date-format/37044
Same result. The format changes from mm-dd-yy to mm/dd/yy when using your suggestion, but after saving and closing and opening again the format changes back to mm-dd-yy.
Created attachment 191358 [details] Screen shot Now I got something weird. I changed some things cell by cell and the date format in the edit field is mm/dd/yy. But the date formats in some cells are mm-dd-yy. And the other fields are numbers now.
I have the same issue now also in other (older) files. Before that worked fine, so it must have to do with some update.
Then please attach another sample file
(In reply to Guus Ellenkamp from comment #0) > Steps to Reproduce: > 1. Format cell to date format mm/dd/yy. > 2. Save file. > 3. Open file. > 4. Date changed back to mm-dd-yy. @Guus, I am trying to reproduce your steps using your attachment 191354 [details] (an xlsx spreadsheet file), but I must be misunderstanding something. When I open attachment 191354 [details] I see 2 worksheets. "Sheet2" has nothing relevant to this report. "Sheet1" has a list of dates. The cells containing the dates are already formatted as "MM/DD/YY" and are displayed accordingly, meaning that there is nothing to initially change or re-format (trying to follow your steps), but rather save the file "as-is" (using a different name). Saving the file with the same xlsx format (with a different name), closing and re-opening it, I still see the dates formatted as MM/DD/YY and displayed in the same way. So, there is no "Date changed back to mm-dd-yy" (and it never was). Perhaps we need more specific steps, and/or a different spreadsheet file. It is also possible that I am seeing different things than you are. Or maybe I am misunderstanding something.
Apparently you are seeing something else than I do. That's why I reported it as a bug as it seems to be related to a specific version.
Maybe some direct format is producing the issue for you. Clear the cell format with [Ctrl+M] and try again.