3 Replies Latest reply on Oct 13, 2014 1:43 PM by jinnocent

    Time Calculation

    jinnocent

      Title

      Time Calculation

      Post

      Hi All,

      I'm looking to get the users total hours from 2 breaks in the day.

      I'd appreciate any help.

      Thanks,

       

      Jean

       

      Microsoft_Excel-1.jpg

        • 1. Re: Time Calculation
          raybaudi

          This one, result Time:

          Let([
          TI = Time_In ;
          LT = Leave Time ;
          B1 = Break_In1 - Break_Out1 ;
          B2 = Break_In2 - Break_Out2
          ];
          LT - TI - B1 - B2
          )

          Note that each Time Field must contain a time till midnight

          • 2. Re: Time Calculation
            philmodjunk

            The difference of any two time fields is the elapsed time in seconds.

            ( Break_In1 - Break_Out1  + Break_In2 - Break_Out2 ) / 3600

            Is the "total hours from 2 breaks"

            But I'm not sure that's what you really want.

            ( Break_Out1 -Time_In  + Break_Out2 - Break_IN + Wrap - Break_In2 ) /3600

            would be the total hours worked.

            Both examples would specify a number result type. If you specify a Time result type, don't divide by 3600--the number of seconds in an hour.

            And if your record might clock times that start before midnight and end after midnight, you should use timestamp values instead of time.

             

            • 3. Re: Time Calculation
              jinnocent

              Both excellent answers, Thank you both.