- excalibur101Asked on March 27, 2015 at 06:50 PM
- ShadaeAnswered on March 27, 2015 at 08:05 PM
Yes it is possible to have your start and date time calculated using two Form Calculation Widget fields.
You would use the first calculation field to subtract the end date and time from the start date date and time.
You would then use the second calculation to multiple the total from the first calculation by 24 to get the total difference in hours.
You can view a sample form here: http://form.jotformpro.com/form/50857456175969
Please feel free to clone this form to your account.
I hope this helps! Please inform us if you need further assistance.
- excalibur101Answered on March 28, 2015 at 11:51 AM
Thanks for your response. I didn't go any further than testing the link you supplied. When that calculation is done....it's wrong. For instance, if you input an eight hour period on a single date, the calculation says it's 7.92 hrs. It's even off if you input a total of 30 minutes.
- AlanJordanAnswered on March 28, 2015 at 12:13 PM
I see the same issue. The result for a 30-minute time difference is .48, not .50 hours.
- JotForm SupportabajanAnswered on March 28, 2015 at 03:35 PM
@excalibur101 and AlanJordan
Try this clone of my colleague's jotform. The expressions entered in its calculation fields are as follows:
For the field labelled "Calculation" (hidden in my form) :
For the "Hours" field:
Of course, you're free to clone the form and examine it for yourselves.
Please open a separate thread if you need to discuss this further. (We've found it's better to deal with each user in their own thread.)
- TycenDemolitionsAnswered on March 16, 2016 at 07:50 AM
Excellent solution abajan ! works great for me! thanks.
- JotForm UI DevelopermertAnswered on March 16, 2016 at 09:09 AM
On behalf of my colleagues, you are most welcome. I hope everyone in this thread will be satisfied with the answer. Please, do let us know for further information.