Question Type: Time-Based Math
Time-Based Math calculates a date based on a Start Date/Time Question and a Duration Question. This can be useful when you need to calculate estimated completion dates on projects, for example. This topic describes the Time-Based Math question settings and properties.
Use Time-Based Math if you want to calculate a date and time (for example, July 18, 2023 at 10:32:00 AM).
Use Duration Math if you want to calculate a duration (for example, 8:30, meaning 8 hours and 30 minutes).
Available on all tiers:
Info:Enterprise customers have additional options. The section Additional options for Enterprise customers describes these options in more detail.
Contents
Mobile App
Time-Based Math is a read-only question. This means that field users can’t interact with or edit the displayed value.
An example of a Time-Based Math question on an iOS device is shown below:
Form Builder
In the Form Builder, the Time-Based Math question appears as shown below:
The Question Edit screen for the Time-Based Math has three tabs: General, Properties, and Help Options Help Options are ways to add help content, such as YouTube videos, web pages, text, or images, to questions in a form. Mobile users simply tap the help icon next to a question to see the help that the form designer provided.. This article will go through each of the tabs.
General
Unique ID
The Unique ID A Unique ID refers to the specific identifier of a question, form page, form section, or Data Destination. Unique IDs are used as reference points when pulling data for conditional logic, Analytics projects, Data Destinations, and Documents. is the reference for the question. For more information on Unique IDs, read: Overview: Unique IDs. It can either be auto-generated based on the question text, or customized.
Restrictions
Restrictions control how your mobile users interact with a question. They can be set on the question itself or controlled by Conditional Logic.
The following table shows which restrictions you can set for the question type. Note that:
-
✓ indicates a restriction that you can configure.
-
✓* indicates a restriction that is always on.
-
✘* indicates a restriction that is always off.
Required | Read-Only | Hidden on Device | Hidden on Reports |
Keep question width to 100% |
|
Time-Based Math | ✘* | ✓* | ✓ | ✓ | ✓ |
* Time-Based Math is Read-Only by default, as the mobile user can’t interact with a Time-Based Math question.
Properties
Properties allow you to set up your question in various ways. Some Properties are due to the Data Type chosen for the question.
-
Date/Time (All tiers)
-
Date (Enterprise tier only)
Date/Time and Date (Enterprise tier only) |
|
Note:(Enterprise tier only) You can’t change the data type after you create a Time-Based Math question. If you want a different data type, you must create a new question and delete the old one.
Calculate a Date/Time
This section allows you to set your source questions for the calculation, and what kind of calculation you are doing. For example, if calculating a projected end date for a construction project, you would want to select Add Duration.
Start Date/Time Question: This dropdown will allow you to select any questions using a Date/Time data type that come before the Time-Based Math question.
Operator: You can add or subtract the duration from the Start Date/Time question to get to your answer.
Duration Question: This dropdown will allow you to select any questions that use a Duration data type that come before the Time-Based Math question.
Additional options for Enterprise customers
Data Types
Enterprise customers can create a Time-Based Math question that has one of the following data types:
-
Date—The result is a date, rounded down to the nearest day. For example, if the calculation adds 26 hours to the start date
2023/10/17
, the result date is2023/10/18
. The calculation adds only the 24 hours of a day and excludes the remaining 2 hours. -
Date/Time—The result is a date and time. The calculation adds the exact amount of time based on the set time unit. For example, if the calculation adds 26 hours to the start date and time
2023/10/17 9:05:34
, the result is2023/10/18 11:05:34
.
Note:You can’t change the data type after you create the question. If you want to change the data type, you must delete the question and create a new one.
Properties
The following image shows the additional properties available on the Enterprise tier.
Tip:The field labeled Duration Question is the value to add or subtract. You can select a question that has a Duration or Integer data type, or enter a constant.
The following table describes the additional properties in more detail.
Property | Description |
---|---|
Start Date/Time Question | |
Start Date/Time Question |
Select one of the following question types:
|
Fallback Value Source |
Choose whether to include a static fallback value for the start question. If a referenced question isn’t answered and doesn’t have a default value, the Time-Based Math calculation uses the fallback value. When you add a start question fallback value, you can either:
The fallback value time zone is the time zone set in your User Profile. |
Duration Question | |
Duration Question |
Choose one of the following options:
|
Units |
Select a time unit. The time unit applies to the fallback value when the Duration Question is:
The time unit applies to the answer value when the Duration Question is:
|
Fallback Value |
If you select a question that uses a Duration or Integer data type, you can set up a static fallback value. If a referenced question isn’t answered and doesn’t have a default value, the Time-Based Math calculation uses the fallback value. |
Help Options
Adding "Help" content to forms gives mobile users access to support and other resources out in the field. Help content is available to users through a button embedded beside a question. Any question in the form can include a link to YouTube videos, web pages, or work instructions.
For more information on Help Content, please read: Add Help Options to Questions