2 Replies Latest reply on Jun 25, 2010 10:11 AM by InvectusIlumni

    Calculation Result Rounding

    InvectusIlumni

      Title

      Calculation Result Rounding

      Post

      Hi guys,  I have a calculation filed that outputs employees' total worked hours.

       

      The result is currently expressed in hours. For more precision, I'd like it to be expressed in hours and quarters of an hour

       

      Example, if an employee worked 2 hours and 15 minutes, it should output 2.25 hours. If he worked 2 hours and 30 minutes, it should output 2.50 hours and so on.

       

      Here's what I currently have:

       

       

      Hours_worked = 

       

       

      Case ( ClockIn_time and ClockOut_time ;
      Round ( ( ClockOut_time - ClockIn_time ) / 3600 + 24 * ( ClockOut_time ≤ ClockIn_time ) - Hours_lunch ; 2 )
      )

       

      Case ( ClockIn_time and ClockOut_time ;Round ( ( ClockOut_time - ClockIn_time ) / 3600 + 24 * ( ClockOut_time ≤ ClockIn_time ) - Hours_lunch ; 2 ))

       

      Thanks