Work out hours between 2 times if crossing midnight

I have 2 times that may cross midnight. Is there a way to create a formula that if it passes 2400 hrs that it can make the necessary calculation. Or can the calculation be made on a date/time stamp for each column?

It would never be more than one day.