Google-sheets – Compute the difference between expected and actual time

google sheets

I am trying to create a delivery driver log that automatically populates the discrepancy between expected return time and actual return time. So if a driver is expected to return at 2pm, but they return at 2:15pm, then I would like to see 15 in the discrepancy column. Inversely if the ETA is 2:15pm and they return at 2pm I want to see -15 as the discrepancy.

Best Answer

Subtraction, like =A2 - B2, works: you just have to format the cell with this formula as Duration.

By default, duration is displayed as 0:15:00 or -0:15:00 when negative. If seconds are not desired, select the cell and go to Format -> Number -> More formats -> More date and time formats and delete the fields you do not need from the format window.

fields