Duration questions collect or calculate a number of hours, minutes and/or seconds. Answers in duration questions can be used in many ways, such as with currency calculations to calculate labour costs. This function is very useful for timesheets and invoicing.
Duration questions are found under Add > Date/Time > Time Duration when building a form.
Note: Duration Picker and Time-Based Math are currently supported by iOS v.6.6.3 and Android v.5.1.0 and later. Always ensure your ProntoForms app is updated to the latest version through your app store.
Watch the video below to see Duration and Time-Based Math in action.
Duration Picker allows users to enter a measure of time. Duration Picker is found under Add > Date/Time > Time Duration > Duration Picker when building a form.
Time Duration Properties
Under the Time Duration Properties tab, restrict answers allowed in the duration picker by:
Precision: Set the format the user will add time in (ex., HH, HH:MM, MM:SS).
Min/Max Value: Set a minimum and maximum amount of time accepted by the question.
Duration Picker Properties
Under the Duration Picker Properties tab, optionally set a default value to be displayed until the user makes a selection.
Use Duration -- Time-Based Math to calculate the difference between two date/time values. This is useful when using mobile forms to clock in and out, and provides payroll with a quick, easy way to calculate hours worked.
Duration Time-Based Math is found under Add > Date/Time > Time Duration > Time-Based Math when building a form.
Under the Time Duration Properties tab:
Time-Based Math Properties
The duration math question must reference a start and end date. Under the Time-Based Math Properties tab, select:
- Start Date
- Question: Choose the date/time question whose answer is the start date/time.
- Fallback: Optionally enter a start date that will be used if no answer is entered.
- End Date
- Question: Choose the date/time question that is the end date/time.
- Fallback: Optionally enter an end date that will be used if no answer is entered.
Duration Calculations use answers in a form to calculate duration. For example:
- Duration (+/-) Duration = Duration
- Duration * Number/Decimal = Duration
Under the Time Duration Properties tab, set:
- Precision: Set how precisely time will be displayed (ex., HH, HH:MM, MM:SS).
- Min/Max Value: Set a minimum and maximum amount of time accepted by the question.
Duration -- Calculation questions calculate duration values only. To calculate other types of values, use number calculation questions.
When Duration data is exported into CSV, it uses the ISO 8601 standard for durations. For more information on the ISO-8601 standard, please read ISO 8601: Durations (external link).