Hi All,
I am having trouble writting a formula to calculate hours shared by two intervals; the basic formula I have been working with are:
Duration: MOD(END-START;1)
(*) HrsShared: IF(start<end; MIN(end; upper)-MAX(start; lower); MAX(0;upper-start)+MAX(0;end-lower))
Case: Worker's Shift: Start=18:00; End=08:00 (next day); first 8 hours of the shift are "regular" (regular_start=18:00, regular_end=02:00)
--Specifically, I need to know how many hours of the "regular" portion are within the Period-of-Interest: Lower: 19:00; Upper: 06:00 (next day)
(*) This formula works fine when Period-Of-Interest-Upper > Period-Of-Interest-Lower.
Your help will be greatly appreciated.
Kinds regards, DMurray3