I'm using a formula to calculate OT by the below logic
if [OT] > 0 and [duplicat] = "ok" then
(if [Punch in- OT] <= [tNight.Start] and [Punch-Out] <= [tNight.Start] then 0 else
(if [Punch in- OT] <= [tNight.Start] and [Punch-Out] > [tNight.Start] then
(if [Punch-Out] >=24 then 24 else [Punch-Out]) - [tNight.Start] endif
else
(if [Punch in- OT] >= [tNight.Start] and [Punch in- OT] < 24 and [Punch-Out] >= 24 then 24 - [Punch in- OT] else
(if [Punch in- OT] >= [tNight.Start] and [Punch-Out] <24 then [Punch-Out] - [Punch in- OT] else 0
endif)
endif)
endif)
endif)
else 0 endif
I'm getting the output as 24 but expected output is 2
I have attached the data of input and expected output.
Thanks in advance 🙂