What did I do wrong?

Hi, I have tried to apply formula below on 7 day hour:

=IF(AE12<7,0,((HOUR(AC12)-HOUR(AB12))-HOUR(AE12))-7) - for the overtime calculation
and
=IF(((HOUR(AC12)-HOUR(AB12))-HOUR(AE12))<7,((HOUR(AC12)-HOUR(AB12))-HOUR(AE12)),7) for the total

but it does not work...

my output is:

Start time: AB12
Finish time: AC12
Lunch: AD12
Total: AE12
Overtime: AF12

Please help...