Wrong Calculate in Calc

Hello.

My total daily working hours are 65 hours, but the calc Libreoffice calculated 17 hours!
Time.ods (13.4 KB)

Please tell us your operating system and LibreOffice Version.
Maybe also some data about your hardware.
Thanks.

1 Like

Version: 7.3.5.2 / LibreOffice Community
Build ID: 30(Build:2)
CPU threads: 2; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: fa-IR (en_US.UTF-8); UI: en-US
Ubuntu package version: 1:7.3.5-0ubuntu0.22.04.1
Calc: threaded

Time (2).ods (24,1 KB)

5 Likes

Just for a short explanation: the questioner’s document wrongly uses the HH:MM:SS wall clock time format that displays only values between 00:00:00 and 23:59:59 and wraps around every 24 hours. The fix uses the duration format [HH]:MM:SS that can display more than 24 hours and negative times. Here we see that the questioner’s formula expressions are also insufficient as -7 hours certainly was not expected… if the end time is less than the start time it needs to be assumed that the time span runs over midnight and 1 needs to be added to the difference, with as here either with =MOD(B9-A9;1) or =B9-A9+(B9<A9) .

2 Likes