Why use =MOD ?
Examp: a1(10:15) b1(22:03), =(MOD(b1-a1), 1)
= 3:50, WHY?
Thanks, Boswell gripWIN@gmail.com
Why use =MOD ?
Examp: a1(10:15) b1(22:03), =(MOD(b1-a1), 1)
= 3:50, WHY?
Thanks, Boswell gripWIN@gmail.com
=(MOD(b1-a1), 1)
is simply not a valid formula and will produce an Err:511 while it is changed to =(MOD(B1-A1)~1)
or something similar depending on the locale probably.=B1-A1
or the strange =MOD(B1-A1;1)
unnecessarily suppressing whole days, the result should be 11:48:00. No rationale for a different result.a1(10:15)
where everybody else would write “A1 is containing the time value 10:15” or similar?I think using MOD function in this way is a workaround from Excel where negative values for time format will be displayed as ######################.
With LibreOffice negative values for time are treated as the time in the previous day, Example -0.2 and 0.8 if shown in time format would both have the same displayed value 19:22:00. Although they may have different result in any further calculations.
If you may have calculations that return negative values for time and you want to maintain compatibility with Excel then you could consider using MOD(x,1) where x is a calculated time difference. This gives the same displayed value in both Excel and LibreOffice.
You need to be very carefull treating negative results for time values in this way.
Example
A1 = 10:15, B1 = 22:03
MOD(B1-A1,1) result is 11:48:00
MOD(A1-B1,1) result is 12:12:00 which makes no sense.
It might be better to use the IF function to make sure that negative time differences are not treated this way.