Forum Discussion

JordanBeatty1's avatar
JordanBeatty1
Qrew Captain
8 years ago

Conditional IF statement with a calculation

I am trying to setup a field that calculates how long employees were working for and auto subtract how long they were on lunch for based on their shift length. The two fields I am using are [Time In] and [Time Out] and both are type Time Of Day. What I am currently using is as follows,

var Number los = (ToMinutes([Time Out]-[Time In])/60);

if (los > 9, los-1,
los < 9 and los >= 8, los-0.5,
los < 8, los,0);
No RepliesBe the first to reply