I am trying to find a formula that will calculate the time an employee worked when they are clocking in before midnight and clocking out after midnight.

Example:

Time In Time Out Break Time In Time Out Total Hours
3:59 PM 12:20 AM 0:30 1:50 AM 3:00 AM

I've tried to format each cell all kinds of ways but I'm ending up with a negative hours worked.

Thanks!