Use Cases: Using Time-Based Math and Calculations

Related Links

 

About

Date/time calculations and time-based math can be used with Time and Date/Time questions to keep track of job hours, and create timesheets.  Use with other number questions to create forms that calculate total fees, taxes, overtime, and more.

 

Use Cases

Find Duration Between Time Stamps

In cases where multiple stamps are being used to keep track of time, find the time between stamps with Duration -- Time-Based Math.  This is useful when building digital time cards. 

  1. Add Date/Time stamp questions on the pages where access will be recorded.  Stamps should be placed on two separate pages, or else they will record identical date/times.  Following them, add a Duration -- Time-Based Math question.

    Note: Questions can only use input values that come before them in the form.  

    Use_Case_1_-_stamps_1_2.png

  2. Select Edit Properties on the Time-Based Math question.  Under the Time-Based Math Properties tab, set the start and end date as the two stamps the duration must be found between. 

    use_case_1_properties.png

[top]

 

Find a Date/Time value using stamp and a duration question

Duration -- Time-Based Math questions can be used to calculate a start or end date.  This is useful for building timesheets.

  1. Add a date/time stamp and duration picker question to provide input values, and a duration -- time-based math  question following them. 
    Note: Questions can only use input values that come before them in the form. 

    use_case_2_questions.png

  2. Mouse over the time-based math question and select Edit Properties.  Under the Time-Based Math Properties tab, set: 

    use_case_2.png
    • Start Date:
      • Question:  Select the stamp question that will be used as the start date/time. 
      • Fallback:  Optionally enter a default time/date that will be used if no answer is given.
    • Duration:
      • Operation:  By default, the chosen duration will be added to the stamp.  For events where the stamp is the end of the duration period, select Subtract.
      • Question:  Select the duration that will be added/subtracted from the stamp.

[top]

 

Adding Durations

Add answers from multiple duration questions together with a calculation question to find a total number of hours.  This is useful for building timesheets and keeping track of work hours. 

  1. Add two or more duration picker questions to the form, and following them, a duration -- calculation question.

    Note: Questions can only use input values that come before them in the form.  

    use_case_3.png

  2. Set the calculation under the Calculation Properties tab to add all desired duration questions together.  

    Learn more about building calculations.

    Untitled.png

[top]

 

Calculating Pay with Duration 

 To calculate the total cost of hours worked, use a currency calculation combined with a duration question.  This is useful for invoices and payroll.

  1. Add a duration question (or questions) to collect hours, a currency number question to collect the rate of pay, and a currency calculation question following them. 

    calculate_costs.png

  2. Under Currency Value Properties in the Hourly Rate and Calculation questions and set the Default Currency.  It is USD by default.  Optionally set minimum and maximum values. 
  3. Under Calculation Properties, multiply the duration question by the pay rate question.

[top]

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments