3 Replies Latest reply on Oct 1, 2012 8:22 AM by CraigFiore

    Time Card Calculation

    CraigFiore

      Title

      Time Card Calculation

      Post

           Hello, I am having a problem with a simple time card calculation. I would like to use a start time, end time and time for lunch. I would like to just put in minutes for lunch such as 30 or .5(for half an hour)

           Currently I have the folowing fields:

           WorkHours Start- Time Field
           Work Hours End- Time Field
           Work Hours Lunch- Time Field
           Work Hours Daily Total- Time Field Caculation

           I tried several different way and types of fields but the caculations never seems to work. 

        • 1. Re: Time Card Calculation
          philmodjunk

               Time fields are number fields that record time since midnight in seconds.

               Make Work Hours Lunch a number field.

               Then the following two calculation options will compute your total time worked:

               WorkHours End - WorkHours Start - WorkHours Lunch * 60 //if Lunch time is entered in minutes (such as 30)

               WorkHours End - WorkHours Start - WorkHours Lunch * 3600 //if Lunch time is entered in hours (Such as 0.5)

               You can select time as the return type to show time worked in hours and minutes or you can divide the result by 3600 and select number as the return type to compute the time worked in Hours.

          • 2. Re: Time Card Calculation
            philmodjunk

                 Note that if some start times come before midnight and some end times come after midnight, you should make your start and end fields, fields of type TimeStamp instead of time.

            • 3. Re: Time Card Calculation
              CraigFiore

                   Works great. Thank you.