Reputation: 7
I want to make a Excel File (Using Libre Office Calc) that calcuates the working time per day, but I'm struggling to get it right as I'd like to have it.
Example:
A1 = type in your Start time. eg: 0800 (!!Note: no colon use at typing )
B1 = type in your End time. eg: 1630 (!! Note: no colon use at typing )
C1 = B1-A1/100 = 8.3 (means 8 hours 30 mins)
Now I'd like to "convert" 8.3 (8 h 30 min)... into 8.5 format. And it should be dynamic, because C1 may could be 8.12 which should be a 8.2 Basically it should take the digit after dot and do /60*100.
I don't want to type colons at A1 and B1.
Here you can download the sample.
I hope it's somehwat clear what I'd like to do.
Upvotes: 0
Views: 826
Reputation: 19367
Added: It is easier to convert to time and back. You'll probably need to format the cell as General as it will probably attempt to display as a time by default:
=24*(TIME(A2/100,MOD(A2,100),0)-TIME(A1/100,MOD(A1,100),0))
This is thanks to a colleague of mine, Hans @ eileenslounge.com
Upvotes: -1