Ask LibreOffice - RSS feedhttps://ask.libreoffice.org/en/questions/Questions and answers for LibreOfficeenFri, 28 Dec 2018 22:13:11 +0100weird Calc results from elapsed-time formula, specific times onlyhttps://ask.libreoffice.org/en/question/177589/weird-calc-results-from-elapsed-time-formula-specific-times-only/In Calc, I use a formula for getting the elapsed time between entries, and the output of the formula returns a 2 or 3 digit number representing *minutes elapsed* between clock times. The formula:
`=(B1-A1)*24*60`
where I manually enter the times (A1 and B1) as HH:MM, formatted as 24-hour for display. For most values, this returns results like this
15:00 15:53 53
However, when the two clock times are roughly between 7:55 and 8:55 AM (the exact limits shift, and I can't keep track of why), and usually ONLY if they are 54 minutes apart OR LESS, they return a number with an inexplicable fraction (13 decimal places!) as here:
08:00 08:53 53.0000000000001
or here:
08:02 08:56 54.0000000000001
or here:
07:57 08:49 52.0000000000001
or here:
07:55 07:56 0.999999999999996
BUT, not here:
08:01 08:56 55
nor here,
08:43 08:57 14
nor here
07:55 08:48 53
I could probably narrow down the specific limiting factors, but I am not that patient. If you ask me why I chose the formula I use for this, my answer is, 'because I did a search and this was the simplest one that worked for me', not because I understand exactly how it works--I'm not that strong a numbers guy. But I think I can see why it should work, and why it should not return fractional results!
Very confused and hoping for help. The weird results are practically NBD, as I get the info I need from the answer, even if it has 13 decimal places. But, while I'm not good at math, I would like for my math to work and make sense, so I'm pretty bothered by this.
thanks for any help!
dpmaddalenaFri, 28 Dec 2018 22:13:11 +0100https://ask.libreoffice.org/en/question/177589/