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?

Solved Solved
0 2 163
1 ACCEPTED SOLUTION

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

View solution in original post

2 REPLIES 2

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

Thank you

Top Labels in this Space