Good day everyone,
I've designed a smartsheet for an airline operation and dealing with standard departure / arrival times versus estimated departure / arrival times.
I have this formula that works great: =IF([ETA/ATA (LT)]@row <> "", ((VALUE(LEFT([ETA/ATA (LT)]@row, 2)) + IF([ETA/ATA (LT)]@row < [STA (LT)]@row, 24)) + (VALUE(RIGHT([ETA/ATA (LT)]@row, 2)) / 60)) - (VALUE(LEFT([STA (LT)]@row, 2)) + (VALUE(RIGHT([STA (LT)]@row, 2)) / 60))) * 60
However I'm trying to find a solution to when we've delayed a flight and are arriving earlier than expected without going into the 24 hour clock. Currently it does the +24 which is excellent when we arrive at 03:00, the above formula calculates properly however if we have a scheduled arrival at 16:30 and an estimated arrival at 16:28, it gives us 1438 minutes instead of -2.
I know this formula would work to get the -2 =IF([ETA/ATA (LT)]@row > "", ((VALUE(LEFT([ETA/ATA (LT)]@row, 2)) + IF([ETA/ATA (LT)]@row > [STA (LT)]@row, 24)) + (VALUE(RIGHT([ETA/ATA (LT)]@row, 2)) / 60)) - (VALUE(LEFT([STA (LT)]@row, 2)) + (VALUE(RIGHT([STA (LT)]@row, 2)) / 60))) * 60 however am unsure how to combine it to include both scenarios and have it function properly to calculate an early arrive with negative numbers and arrivals after midnight for positive numbers.
I would appreciate any help and expertise on this to figure it out as I'm a bit lost.