Description: Date function works with literal values but is unreliable with calculated values. This occurred in both 7.6.2 and just now installed 7.6.4. Steps to Reproduce: 1.PICK A CELL, A10, TYPE 4.15202 2.IN CELL B10 TYPE =INT(A10) 3.IN CELL C10 TYPE =A10-B10 IN CELL D10 TYPE =C10*100 IN CELL E10 TYPE =INT(D10) IN CELL F10 TYPE =D10-E10 IN CELL G10 TYPE =F10*10000 IN CELL H10 TYPE =DATE(G10,B10,E10) Actual Results: IN H10: 04/15/2021 Expected Results: IN H10: 04/15/2022 Reproducible: Always User Profile Reset: Yes Additional Info: TOO BAD THE HELP INF REQUESTED CAN NOT BE COPIED! Version: 7.6.4.1 (X86_64) Build: e16e193f88cd6c0525a17fb7a... Environment: CPU threads: 24; OS: Windows 10.0 build 22621 User interface: UI render: Skia/Raster; VCL: win Locale: en-US (en-US); UI: en-US Misc: Calc threaded
Created attachment 192227 [details] wrongdate.ods it's a calc file
Thanks for the report. I see the same in your sample document. Unfortunately, this is likely due to floating-point arithmetic imprecision common to many tools. If you use in cell G16 the following formula instead: =ROUND(F16*10000) ... the date will be as expected. You can also see how the DATE() formula will handle a value that is just under the target value, try this: =DATE(2021.9999999,4,15) See this help page: https://help.libreoffice.org/latest/en-US/text/scalc/01/calculation_accuracy.html There is an open report to improve the situation, so I will mark as duplicate as that one. *** This bug has been marked as a duplicate of bug 136615 ***
(In reply to Rich from comment #0) > Additional Info: > TOO BAD THE HELP INF REQUESTED CAN NOT BE COPIED! ??? The Help->About dialog has a *button* to copy the data to clipboard, immediately next to "Version information" words, with a tooltip saying "Copy all version information in English".