Currently Being ModeratedJan 17, 2013 1:48 PM (in response to homegrowntx)
That can work in Numbers except that because you have that binary (true/false statement) in there it is converting it to a decimal result of 10.25 which is 10.25 hrs = 10 hrs 15 min. You can convert it back to a duration (hours and minutes) with a formula but there is more you need to know first. Plus, the use of "B2>C2" to create a 0 or 1 is a simplification that will cause a warning about using a binary as a number.
In Numbers you have to be a bit more careful when using "time" values. "Time" values are really "Date & Time" values. If you enter a "time" in your spreadsheet today, it will be that time on today's date. If you enter it tomorrow it will be that time with tomorrow's date. That could be handy if you are using it to clock in and clock out and you are entering time at the moment you clock in or out. In that case you can use the simpler formula = C2-B2.
But if you are making a schedule and you will be entering "time" data on different days and maybe going back tomorrow to edit the schedule, you need to strip the dates before you do any calculations. This is going to be a lot more complicated than the Excel version.
If you want to use the result in a calculation, such as multiplying by an hourly wage, you don't want it to be a duration, you want a decimal value:
Currently Being ModeratedJan 17, 2013 2:09 PM (in response to homegrowntx)
Forum went down before I could edit my post. I misread your original formula the first time around and left out a set of parentheses. I didn't notice until I tried doing the same in Excel and got wacky results there. However, in Excel your formula gave me 10.25, not 10:15. maybe some format other than "Number" is required?
This is the equivalent in Numbers:
The first has the problems I mentioned in my first post.
The second one is of the same form as the Excel version and gives the same result.
Currently Being ModeratedJan 17, 2013 3:04 PM (in response to homegrowntx)
Here's an expression that I hope will help with the muddling....
Assume that your Start time is in C2 and your End Time is in C3, then this expression will calculate the time worked in hours and minutes, while acocunting for time worked across the midnight hour:
=IFERROR(DURATION(,,((TIMEVALUE(C3)-TIMEVALUE(C2)) + IF(TIMEVALUE(C3)< TIMEVALUE(C2), 1, 0))*24,,), "")