Hello! I need to calculate the time that has passed between two specific times, however I need to calculate them only between 7am and 4pm and ignore the rest of the time. So for example if the start time is 12/4/19 3:50PM and the ending date is 12/5/19 7:10AM I need the formula to calculate that only 20mins passed, instead of 15 hours and 20mins. And if the start time is after 4pm, I need the formula to calculate starting the following business day at 7am.
Looking through this forum I found a formula that works perfectly if the start and end dates are within the schedule, but it's not able to calculate it if it falls outside the schedule. The formula I'm using is the following:
=((NETWORKDAYS(I16,K16))*15/24)+16/24-MOD(I16,1)+MOD(K16,1)-7/24
I16= Start Date/Time
K16= End Date/Time
The following are two examples where the first one works great but the second one doesn't:
I appreciate any help you can provide to improve this formula.
Thanks,
Looking through this forum I found a formula that works perfectly if the start and end dates are within the schedule, but it's not able to calculate it if it falls outside the schedule. The formula I'm using is the following:
=((NETWORKDAYS(I16,K16))*15/24)+16/24-MOD(I16,1)+MOD(K16,1)-7/24
I16= Start Date/Time
K16= End Date/Time
The following are two examples where the first one works great but the second one doesn't:
I appreciate any help you can provide to improve this formula.
Thanks,