Bug 149033 - With certain date time FORMATTING the seconds fraction does not display in the formula bar and when EDITING the cell
Summary: With certain date time FORMATTING the seconds fraction does not display in th...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.1.8.1 release
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Calc-Formula-Bar
  Show dependency treegraph
 
Reported: 2022-05-11 08:25 UTC by Wes
Modified: 2022-12-27 22:20 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
examples of formats (27.76 KB, application/vnd.oasis.opendocument.spreadsheet)
2022-05-11 08:27 UTC, Wes
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Wes 2022-05-11 08:25:24 UTC
Description:
In date times with a format with 4 (or more) digits behind the decimal point of the seconds, 
e.g. "YYYY/MM/DD HH:MM:SS.0000" these digits are not shown in the formula bar, and if F2 is pressed to edit the cell this part disappears in the cell as well.

E.g. cell shows: 08/29/2013 13:45:59.9200, but formula bar shows: 08/29/2013 13:45:59

The same happens if the format contains less of these digits than are entered in the cell (e.g. format "...SS.00" with 
cell content "...:59.920")

This does not happen if the cell does not contain the date part, but only a time, and a time format.


Steps to Reproduce:
see attachment

press F2 to edit when on cell B6,B7,B8 or B9

Actual Results:
no fraction of the seconds displayed in formula bar or when editing the cell in the cell itself

Expected Results:
fraction of the seconds should be displayed in formula bar or when editing the cell in the cell itself


Reproducible: Always


User Profile Reset: No


OpenGL enabled: Yes

Additional Info:
Version: 7.3.2.2 / LibreOffice Community
Build ID: 30(Build:2)
CPU threads: 4; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Ubuntu package version: 1:7.3.2-0ubuntu2
Calc: threaded
Comment 1 Wes 2022-05-11 08:27:21 UTC
Created attachment 180055 [details]
examples of formats
Comment 2 m.a.riosv 2022-05-11 18:02:19 UTC
Repro with
Version: 7.3.3.2 (x64) / LibreOffice Community
Build ID: d1d0ea68f081ee2800a922cac8f79445e4603348
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: en-US Calc: CL
Formula doesn't show thousandths

But remember that LibreOffice has a limit of 15 significant digits, that become from the processor's limits.
So if you have date in the value with five digits for the date part, there is no space to keep more than four thousandths.
Comment 3 LeroyG 2022-05-11 18:35:56 UTC
Reproducible with:

Version: 7.1.8.1 (x86) / LibreOffice Community
Build ID: e1f30c802c3269a1d052614453f260e49458c82c
CPU threads: 4; OS: Windows 6.1 Service Pack 1 Build 7601; UI render: Skia/Raster; VCL: win
Locale: es-MX (es_MX); UI: en-US
Calc: threaded
Comment 4 Wes 2022-05-12 06:59:35 UTC
(In reply to m.a.riosv from comment #2)

> But remember that LibreOffice has a limit of 15 significant digits, that
> become from the processor's limits.
> So if you have date in the value with five digits for the date part, there
> is no space to keep more than four thousandths.

Yes, but the problem is not the fifth digit, but that in those cases, the first digit can disappear from view. Thus in case of 08/29/2013 13:45:59.9200, this would mean almost a whole second. In addition, if you apply the SECOND() function to this date, you may miss almost a whole minute, because this function rounds 59.9 seconds to whole seconds and then equals 60 to 0 (by the way, the MINUTE() function does not round, but truncates)