- cptechAsked on July 18, 2017 at 10:45 AM
I am trying to make several advance calculations.
I have a Start Time and a Finish Time that will be chosen by the person filling out the form. From the two times selected I will need to know the total time between the two entries expressed in total hours and minutes format in its own field. This total time spent filed will then be used for later calculations.Page URL:
- JotForm SupportBDAVIDAnswered on July 18, 2017 at 02:16 PM
There is a way to accomplish what you need, you need to add four calculation widgets: https://support.jotform.com/help/259-How-to-Perform-Form-Calculation-Using-a-Widget
1) In the first calculation widget you will calculate the hours difference using the Floor math function: https://www.jotform.com/help/267-Form-Calculation-Math-Function-Reference
Formula: floor(EndTime - StartTime)
2) In the second calculation widget, you need to calculate the total minutes:
Formula: (EndTime - StarTime)*60
3) Then you need to calculation the minutes difference:
Formula: (Hours * 60 - TotalMinutes)*(-1)
4) Finally put the hours and minutes difference together:
Hours : Minutes
Do not forget to hide the first 3 calculation widgets:
You can clone my form if you want to: https://www.jotform.com/help/42-How-to-Clone-an-Existing-Form-from-a-URL
Let us know if you need more help.