-
Joor_InterpretationAsked on June 17, 2024 at 2:46 PM
Hello, I can't seem to get it to work but I need an "if" function that will:
- Calculate the difference in minutes between date&time start & date&time end.
- if the value is greater than "90", input that number into the "summary" field
- if the value is less than "90", input 90 into the "summary" field
thank you!
-
Jefferson JotForm SupportReplied on June 17, 2024 at 3:25 PM
Hi Joor_Interpretation,
Thanks for reaching out to Jotform Support. We can calculate the minute difference between the Date/time of Service: Start field and the Date/time of Service: End (anticipated) field and set the condition where if the value is greater than 90, we will reflect that value to the Summary field and if the value is less than or equal to 90, we will return the value 90 to the Summary field. Here's how to do it:
- In Form Builder, click on the Build tab in the orange navigation bar at the top of the page.
- Click on the Add Form Element button on the left side of the page.
- In the Form Elements window, click on the widgets tab.
- Drag a Form Calculation widget to your form and name it Summary.
- Click on the Settings tab in the orange navigation bar at the top of Form Builder.
- Select Conditions on the left side of the screen.
- Click +Add a New Condition.
- Select Update/Calculate Field and then set the conditions just like you see below:
Here's the sample output:
We also have a guide about Performing Date and Time Calculations that you can check out.
Give it a try and let us know how it goes.