Hello.

I have a Form where the user enters Start-time and Stop-time.
The form has four fields, T1 for start hour (0-24) and M1 for minutes,
T2 and M2 for end of workday. Ex: 09 45 and 18 00.

I have to calculate two different overtime values.
First is overtime between 15:00 to 21:00
Second is overtime from 21:00 to 07:00 (next morning)

Normal worktime, whitout overtime is 07:00 to 15:00

I want the resulting overtime to be in the format h,m (3,30 for 3 hours and 30 minutes)

Can anyone here show me a nice solution for this?


Many thanks in advance, Janbanan