Subtract 1 hour from a time duration

Hello. I have a problem. In my application, people must mark the time of entry and the time of departure. But if in that period of time hour 12 is included, I need to subtract 1 hour. Example entry time 8:00 am exit 11:30 am should not subtract 1 hour. Example 2 if the entry mark is at 10: am and the exit mark is at 1: pm, you should subtract 1 hour since the staff begins at 12: 00 and lasts 1 hour. Could you help me with the syntax of the formula?

IF(
  AND(
    [entry time] < "12:00:00" ,
    [exit time] > "12:00:00"
  ) ,
  [exit time] - [entry time] - "001:00:00" ,
  [exit time] - [entry time]
)
2 Likes

Thank you

2 Likes