How does one convert time into decimal? Time worked minus lunch.

Hello,


Thank you for the help in advanced. I am having trouble on Numbers….

I am trying to convert time to decimal. I have a start time, lunch start time, lunch end time, and finish time. I only want to account for total number of hours worked but in a decimal format.

Ex:

Time In: 07:00

Lunch Start:13:30

Lunch End 14:00

End Time: 20:00


I would like K8 =(End Time - Start Time)-(Lunch end -Lunch Start) ?



iPad Pro, iPadOS 16

Posted on Jan 9, 2023 2:03 PM

Reply
Question marked as Top-ranking reply

Posted on Jan 10, 2023 1:30 AM

Hi Gnodneit,


The function DUR2HOURS is your friend.


Formula in K8: DUR2HOURS((I8−D8)−(F8−E8))


Regards,

Ian.

4 replies

Jan 10, 2023 5:37 AM in response to Yellowbox

Wow, YellowBox, You have completely solved it.

Just a follow up question:


Is there a formula that can happen if there is no lunch?

Suppose there is no lunch time, F8 and E8 would be left blank.

I can not use 00:00 as that would be read as midnight.

Using 00:00 was my work around, however as stated, one may also read that as midnight and I would like to avoid confusion.


Jan 10, 2023 7:17 AM in response to Yellowbox

Ian,


Thank you in advanced. Maybe you could also solve this question/issue.


In the case where start time is 14:00, however end time is in the morning…let’s say 03:00. Would the formula work?


I have input the values and getting an odd outcome. Is this because of the 24hr clock computation?


Any help will be greatly appreciated!


I will attach the problem:


This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How does one convert time into decimal? Time worked minus lunch.

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.