I am using a formula to subtract a 30 minute lunch period from the total minutes lapsed based on whether the lunch field has a checkbox or not.
Within the if statement, if the start time hour is lesser than the end time hour the formula works as expected and 30 minutes are subtracted from the total minutes lapsed (criteria 2, value is false).
If the start time hour is greater than the end time hour (criteria 1, value is true) 30 minutes should be subtracted as well. However, what's actually happening is 60 minutes are being subtracted as if both the true and false criteria are being met.
Lunch - checkbox column, 1 = checked 0 = unchecked
Calc Start Time - hour of the start time (i.e. 6 = 6 am/pm)
Calc End Time - hour of the end time (i.e. 6 = 6 am/pm)
=IF(Lunch@row = 1, IF([Calc End Time]@row - [Calc Start Time]@row < 0, (([Calc End Time]@row + 12 - [Calc Start Time]@row) * 60) - 30, ([Calc End Time]@row - [Calc Start Time]@row) * 60) - 30, IF([Calc End Time]@row - [Calc Start Time]@row < 0, ([Calc End Time]@row + 12 - [Calc Start Time]@row) * 60, ([Calc End Time]@row - [Calc Start Time]@row) * 60))