Conditional IF statement with a calculation

  • 0
  • 1
  • Question
  • Updated 2 years ago
  • (Edited)
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);
Photo of Jordan

Jordan

  • 1,574 Points 1k badge 2x thumb

Posted 2 years ago

  • 0
  • 1

Be the first to post a reply!