Bug 145827 - 'Standard' cell format turns to Date if it's the first cell in a column
Summary: 'Standard' cell format turns to Date if it's the first cell in a column
Status: CLOSED DUPLICATE of bug 116106
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Number-Format
  Show dependency treegraph
 
Reported: 2021-11-22 12:25 UTC by Mike Kaganski
Modified: 2023-04-24 23:39 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Kaganski 2021-11-22 12:25:25 UTC
In a new spreadsheet:

1. Put '=TODAY()' to A1
2a. Format A1 as Number->Standard
3a. Save as ODS and reload

The cell format reverts to date.

Alternatively, do not do 2a, and do the following:
2b. Put =A1 to A2
3b. Put =A1 to B1
4b. Format A2 and B1 as Number->Standard (but keep A1 formatted as date)
5b. Save as ODS and reload

The format of A2 will stay numeric, but format of B1 will revert to date.

Tested with Version: 7.2.3.1 (x64) / LibreOffice Community
Build ID: 1d5dee817bde88d78dbcc0d00f88492568e131d5
CPU threads: 12; OS: Windows 10.0 Build 19043; UI render: default; VCL: win
Locale: ru-RU (ru_RU); UI: en-US
Calc: threaded

and with Version: 4.3.0.4
Build ID: 62ad5818884a2fc2e5780dd45466868d41009ec0

In versions 4.1-4.2, A2 and B1 both showed date after reload, and had Date format in cell format dialog.

In version 4.0 and older, A2 and B1 also both showed date after reload, but had Number->Standard format in the dialog.
Comment 1 LeroyG 2021-11-22 20:32:39 UTC
Format A1, A2 and B1 as Standard, Reload, and all three will revert to date.

Version: 7.1.7.2 / LibreOffice Community
Build ID: c6a4e3954236145e2acb0b65f68614365aeee33f
CPU threads: 1; OS: Linux 4.12; UI render: default; VCL: kf5
Locale: es-MX (es_ES.UTF-8); UI: en-US
Calc: threaded
Comment 2 Eike Rathke 2023-04-24 15:37:20 UTC
Recalculated formula cells with General format get a format corresponding to the result applied if the result is of date, time or boolean.

*** This bug has been marked as a duplicate of bug 116106 ***
Comment 3 ady 2023-04-24 23:39:05 UTC
(In reply to LeroyG from comment #1)
> Format A1, A2 and B1 as Standard, Reload, and all three will revert to date.

FWIW, that description is not consistent. It might even vary depending on the cells that end up as "selected" before saving. Use [CTRL]+[M], then re-saving the same file, closing and re-opening might show only 2 of them as date. The next cycle of clear formatting... the result might be different. I tried to narrow down the exact variables or STR that influence the result, with no clear conclusion, but with evident observations – those I just described here.