Bug 161525 - LibreOffice Calc cell formatting changes back to date
Summary: LibreOffice Calc cell formatting changes back to date
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.6.0.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-06-12 10:02 UTC by lyzzard87
Modified: 2024-06-12 11:06 UTC (History)
0 users

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 lyzzard87 2024-06-12 10:02:52 UTC
Description:
I need to write version numbers to a specific cell. Whenever I write 1.1.1 or 1.1.2 the formatting changes to date (2001.01.01). If I change it back to number, it gives 36893. If again I write 1.1.1 then it gives 2001.01.01. 
No issues with writing 1.1.0 for example, issue occurs only with 1.1.1 or above.

Steps to Reproduce:
1. open Calc, type 1.1.1 in a cell, it changes to 2001.01.01
2. change formatting to number, it will give 36892
3. type 1.1.1 again, it will change back to Date formatting

Actual Results:
typing 1.1.1 will give Date formatted cell

Expected Results:
Show 1.1.1 with number formatting set


Reproducible: Always


User Profile Reset: Yes

Additional Info:
Version: 7.6.0.3 (X86_64) / LibreOffice Community
Build ID: 69edd8b8ebc41d00b4de3915dc82f8f0fc3b6265
CPU threads: 12; OS: Windows 10.0 Build 26120; UI render: Skia/Raster; VCL: win
Locale: hu-HU (hu_HU); UI: en-GB
Calc: CL threaded
Comment 1 Mike Kaganski 2024-06-12 10:49:53 UTC
Calc is a spreadsheet software. As it is the standard in spreadsheets, the default behavior is to try to interpret any user input as a numerical value (a number, a percentage, a fraction, a date, a time...). So it sees your "1.1.1" in a default-formatted cell, and it tries to interpret that text as different kinds of numeric data - at which point, it sees that it might be a "valid" date. (And 1.1.0 can't be a valid date in your locale: there can't be day 0 in a date.)

If you want to have a textual content in a cell, which could be possibly interpreted as numeric, you either enter it with leading apostrophe (which tells Calc explicitly, that the following is a text), or you format the cells - e.g. the column - as Text *before entering the data*.

This is not a bug.
Comment 2 lyzzard87 2024-06-12 11:06:19 UTC
Thank you!