Need your help with my case.

How to make calculating total overtime working hours using condition ?
Example :

using input type,

```
OT From <input type="text" name="ot_from">
OT To <input type="text" name="ot_to">
Total Hours <input type="text" name="total_hours">

```

Working days : from 08.00 - 17.00 (normal working days)
If I working until 19.00, should be calculate that I do overtime for 2 hours.

In my rules, from 18.00 - 18.30 not calculate overtime because that's a break time.
So should be my total Overtime hours is 1.5 not 2 hours.

Someone can give me a solution ?
Appreciate your help.

Thank you.
David