What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.
At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.
We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.
Can I calculate the number of days between two dates (example: Today miAsked by demnos on May 02, 2014 at 03:35 AM
Can I calculate the number of days between two dates (example: Today minus a date from my form)?
This is a re-post of a comment on How to Perform Form Calculation Using a Widget
You can achieve your requirement with using our Form Calculation widget.
First you need to add 2 date fields to your form. Then add Form Calculation widget and configure it to calculate the number between two dates.
If you want to calculate the difference between today and the other date field you can set first date field’s value to default and hide it. This will set date field value to today and it will never be seen on your form.
You can find additional information about Form Calculation widget here.
If you have any other questions, please let us know.
I'll give this a try. Thanks!
Ok, so this calculation isn't working.
I tried to calculate May 3, 2014 (today) - May 1, 1981 I get an answer of 4212.7. What does this number represent? It isn't days because if you divide it by 365 (days in a year) you get 11.54 when I would expect something around 33 years. Do you know how this application handles dates?
You have to disable the TIME in the DateTime field so to have the correct days. To disable, simply click on the "Allow Time" button:
Example Form: http://www.jotformpro.com/form/41228066850958
If you require any further assistance, feel free to contact us.
Got it working then. Thanks.
I was using the Birthday Picker instead of the plain DateTime picker. :-(