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.

  • Profile Image

    Can I calculate the days between two dates?

    Asked by billwiese on May 18, 2015 at 09:43 AM

    Can I calculate the days between two dates?

    This is a re-post of a comment on Form Calculation - Math Function Reference

  • Profile Image
    JotForm Support

    Answered by Jan on May 18, 2015 at 11:04 AM

    Yes, you can perform calculation in the dates. I created a demo form that shows the start date, the end date, and the total number of days. Here are the steps that I did to make this demo form.

    1. I created 2 DateTime fields.

    2. I also created a normal text box field where the result of the calculation will show.

    3. After that, I used the condition "Update a Form Field Value".

    4. The condition looks like this:

    The condition (If End Date is Filled) is configured like this so that the (Total Days) field will not show any value  until the data is completed. Because, if you put a value on the Start date, it will immediately perform calculation even if there is no End date.

    The formula shows End date - Start date, because it will be a negative value if it is the other way around.

    Let us know if you need any help. Thank you.

  • Profile Image

    Answered by accountax on May 30, 2015 at 05:27 AM

    If in this issue I want to fix the end date as 01/04/2015.

    then please tell how can I fix this date in end date.

    and i want to calculate age in years.

  • Profile Image
    JotForm Support

    Answered by Jan on May 30, 2015 at 07:02 AM


    You need to open a new thread next time so that we can assist you properly. I created a thread for you,  this is the URL of the new thread: http://www.jotform.com/answers/578977

    Thank you for understanding.