In order to calculate the difference between two time values, the earlier time must be subtracted from the later one.
However, using this method when the later time is actually the next day, will result in an error (negative time).
How could we avoid such errors when calculating the difference between any two time values?


Using this MOD formula:

Apply hh:mm format to cells contains the formula above.