-
Nicholas_nick_nick437Asked on August 1, 2025 at 4:24 PM
-
Ronald JotForm SupportReplied on August 1, 2025 at 5:16 PM
Hi Nicholas,
Thanks for reaching out to Jotform Support. I understand what you’d like to do, but I’ll need a bit of time to work out a solution. I’ll get back to you shortly.
We appreciate your patience while we work on a solution.
-
Ronald JotForm SupportReplied on August 1, 2025 at 6:00 PM
Hi Nicholas,
It's really easy to calculate and round up a Time field. For this, you will need Form Calculation widgets, Number fields, and Conditions. Let me walk you through it:
First, you need a From Calculation widget to convert the Time field:
- While in Form Builder, click on Add Element on the left side of the page.
- In the Form Elements menu, under the Widgets tab, scroll down the list and choose the Form Calculation widget.
- Now, just drag and drop it to your form.
4. Click the Wand icon and set your formula like this:
Next, you need three Number fields for the calculations:
- Click on Add Element on the left side of the page again.
- Under the Basic tab, drag and drop a Number field to your form.
Then you can set up the Conditions:
1. In Form Builder, in the orange navigation bar at the top of the page, click on Settings.
2. Click on Conditions on the left of the page.
3. Now, click on Add a New Condition and then click on Update/Calculate Field.
4. Set the conditions like you see below:
To round the time to minutes:
To get the hours:
To get the minutes:
Lastly, add another Form Calculation widget to show the results as hh:mm with this formula:
You can clone and test my demo form here. Take a look at the screenshot below to see my results:
Give it a try and reach out again if you have any other questions.
-
Nicholas_nick_nick437Replied on August 4, 2025 at 4:35 PM
Hi Ronald,
Thank you for your help! I was able to successfully replicate your example.
A few remaining questions I have below:
- How can we get the results in AM/PM time format?
- The output result is missing a digit when 10 or 11 is entered in the hours (Example: 10:08AM shows a rounded result of 10:0)
Thanks!
-
Manilene JotForm SupportReplied on August 4, 2025 at 5:00 PM
Hi Nicholas,
The Time field can be set to either 24-hour or 12-hour (AM/PM) format. To ensure results appear in AM/PM format:
- Click the Gear icon to open the Time field’s Properties.
- Under the Options tab, select the AM/PM time format.
Fixing the Missing Digit for Hours 10 or 11. The missing digit issue often happens when calculation or condition formulas do not handle two-digit hour values properly. To resolve this:
- Treat the hour value as text rather than a number in your calculations.
- If possible, apply padding (adding a leading zero) to ensure the hour displays in full.
- Double-check your formulas to confirm that hours with two digits are displayed completely without being truncated.
Reach out again if you have any other questions.
-
Nicholas_nick_nick437Replied on August 5, 2025 at 4:09 PM
Thanks Manilene,
What additional conditions will I need to put in place in order to display the AM/PM correctly?
Fixing the Missing Digit for Hours 10 or 11. *The issue looks like it is coming from the Number Field: mm because there is only one digit showing in that field when testing. I tried changing both minute and hour value fields to text in the calculation widget although I am getting the same result. How can I verify if the hours or minutes in the formulas are not being truncated?
Thanks,
-
Jonathan JotForm SupportReplied on August 5, 2025 at 4:37 PM
Hi Nicholas,
I'll need a bit of time to look into this. I'll get back to you as soon as I can.
In the meantime, let us know if you have any other questions.
-
Jonathan JotForm SupportReplied on August 5, 2025 at 5:55 PM
Hi Nicholas,
Could you confirm that it was the Total Interruption Time, that you wanted in AM/PM format? If this is the case, keep in mind that the value is not in Time format, but integer/number value. So it cannot be converted to Time format (AM/PM).
Once we hear back from you, we'll be able to move forward with a solution.
-
Nicholas_nick_nick437Replied on August 7, 2025 at 4:03 PM
Hi Jonathan,
"BEGIN Client Care (Rounded)" is the field I want in AM/PM format.
Thanks,
-
Ronald JotForm SupportReplied on August 7, 2025 at 4:35 PM
Hi Nicholas,
Unfortunately, it's not possible to display the value in AM/PM format when using Form Calculation fields, as they don’t support time formatting. The BEGIN Client Care (Rounded) field is storing a numeric value in the format hh:mm, which we manually set to resemble a time but it's not a valid time object. Because of that, it can't be converted or formatted as an actual time field.
Reach out again if there’s anything else we can do for you.
-
Nicholas_nick_nick437Replied on August 8, 2025 at 9:17 AM
Hi Ronald,
Would I be better off changing the time format of the field BEGIN Client Care (on duty) to 24-hour? This would not display the AM/PM but would help us display the rounded results.
Also, I am still having an issue with the field BEGIN Client Care (Rounded) only showing 2 or 3 digits depending on the input time. For Example: BEGIN Client Care (on duty) = 09:01, BEGIN Client Care (Rounded) = 9:0.
I need the BEGIN Client Care (Rounded) to display 09:00. I believe the issue is related to the Number Field: mm but not sure how to fix it.
Thanks,
-
Lara JotForm SupportReplied on August 8, 2025 at 10:00 AM
Hi Nicholas,
Yes, switching the BEGIN Client Care (on duty) field to a 24-hour time format can help display more consistent and accurate results, especially if you're rounding time values or calculating time differences.
As for your other question, you'll need to add additional fields and conditions to achieve this. Let me show you how:
- In Form Builder, right click on Number Field: mm and BEGIN Client Care (Rounded).
- Select Duplicate from the list of each field.
1. In Form Builder, in the orange navigation bar at the top of the page, click on Settings.
2. Click on Conditions on the left of the page.
3. Now, click on Add a New Condition and then click on Update/Calculate Field.
4. Set the conditions like you see below:
Lastly, set up the formula of the duplicated Form Calculation Widget like you see below:
You can add a Show/Hide field condition as well, to only display the duplicated fields if the value is below 10. Check out the screenshot below:
Checkout the screenshot below to see my results:
Give it a try and let us know how it goes.
-
Nicholas_nick_nick437Replied on August 8, 2025 at 11:44 AM
Hi Lara,
I followed your steps in field duplication and new conditions. For some reason, I am still getting a weird result.
The duplicated Number Field: mm2 is not displaying the 00 when I enter a value of 10 or less in the Number Field: mm. Are you able to review my form calculations to see where our results differ?
Thanks,
-
Eiron_O JotForm SupportReplied on August 8, 2025 at 12:27 PM
Hi Nicholas,
If you want to include the value of 10 to display 00, you can change the condition in the Number field: mm. Let me show you how:
- In your Number field: mm condition, change the value from 10 to 11.
- Also, change the 00 from Number type to String type to make sure it shows up as text.
Here's the result:
You can check my Demo Form and see if this works for you.
That's it. Give it a try and let us know if you need any more help.
-
Nicholas_nick_nick437Replied on August 8, 2025 at 4:38 PM
Hi Eiron,
Thank you for the response. I was able to fix the issue with 3 digits displaying. I want the rounding rule to round the time up or down to the nearest quarter hour based on 7 minutes.
BEGIN Client Care (Rounded)2 will not round the minutes properly if I have any digit higher than 8 in the minutes field. Although the BEGIN Client Care (Rounded) field shows the correctly rounded value when entering 10:09, BEGIN Client Care (Rounded)2 will show 10:0. You can run a test with your Demo form. Enter the value: 10:08 vs 10:09.
Thank you,
-
Ronald JotForm SupportReplied on August 8, 2025 at 5:12 PM
Hi Nicholas,
The issue was that there were still no conditions set for the field Number Field: mm2 when the value of Number Field: mm is greater than 11. This leaves a blank value, which is interpreted as 0 by the Form Calculation widget. See the screenshot below for when the value is 10:08:
While it is blank for when 10:09:
You would then need to set a new condition for when the value is greater than or equal to 11:
Let us know if there’s anything else we can do for you.
-
Nicholas_nick_nick437Replied on August 11, 2025 at 9:32 AM
Hi Ronald,
I am confusing myself with all the conditions I need to make the rounding occur successfully. The rounding is not working as I intended.
What are all the conditions I will need in place so that any number input equal or greater than 8 minutes would round up to the nearest 15 minutes? Can you list them in order so I can replicate?
Thank you,
-
Kris Ann JotForm SupportReplied on August 11, 2025 at 10:45 AM
Hi Nicholas,
If you want to round off the values if the data in the minute field is more than 8 minutes, you will need to update your existing conditions. Let me show you how:
1. In Form Builder, click on the Number Field: mm field then, click on Conditions.
2. Hover your mouse over to Condition number 1 and 2 and click on the Pencil Icon.
Give it a try and let us know if you need any other help.
-
Nicholas_nick_nick437Replied on August 11, 2025 at 11:44 AM
Hi Kris Ann,
I applied the conditions for 8 and 9. I feel like I am getting close to a final result that I need. Here are screenshots of the results I am getting when entering 10:08 and 10:09. It looks like 10:09 is rounding but it is adding a trailing zero. When entering 10:08, it is still giving me no value for Number field: mm2 and is only showing 3 digits.
-
Kyle JotForm SupportReplied on August 11, 2025 at 12:20 PM
Hi Nicholas,
I cloned your form and I easily replicated the issue. I noticed that the Update/Calculate Field condition for mm2 is configured differently from the setup my colleague Kris Ann recommended. To ensure it works correctly, you'll need to match the condition exactly as she outlined above this thread. You can clone to see the setup here.
Give it a try and let us know if you have any other questions.
Your Reply
Something Went Wrong
An error occurred while generating the AI response. Please try again!