https://bugs.documentfoundation.org/show_bug.cgi?id=152967
Mike Kaganski <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |NOTABUG Status|UNCONFIRMED |RESOLVED --- Comment #1 from Mike Kaganski <[email protected]> --- (In reply to Joachim Wetzig from comment #0) > When formatting a cell with a custom time format containg a "d" for days the > shown value is one off (too high). No, it isn't correct. > E. g. use a cell containing numerical 12.5 (i.e. twelve and a half days) the > format code [d " d " h " h "] should return '12 d 12 h'; it returns '13 d 12 > h'. No, it should (and does) return '11 d 12 h', because 'd' is not a *duration* format, but a calendar date's day. Datetime's value '0' is the epoch, which *by default* (see Options->Calc->Calculate) means 1899-12-30; '1' means 1899-12-31; '2' means 1900-01-01; and so on - so '12' means 1900-01-11, of which, the '11' is used for the 'd' code. If you want durations in *days*, just use something like =INT(A1) & " d " & TEXT(A1; "h "" h """) -- You are receiving this mail because: You are the assignee for the bug.
