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

    Age calculation from 2 dates

    Asked by rmccoy on May 08, 2016 at 08:15 PM

    Can't seem to get this to work. I want to get the age of someone from two different date fields using the condition feature.  

    2 dates different work can't to get
  • Profile Image
    JotForm Support

    Answered by ashwin_d on May 08, 2016 at 09:03 PM

    Hello rmccoy,

    Why do you want to use condition feature only to calculate age? You can take advantage of our "Form Calculation" widget to achieve your requirement. You need to add following formula to calculate age;

    floor((current date - date of birth)  / 365)

    Please check the screenshot below for all the steps:

    If you want to achieve this through conditions only, you can take advantage of our "UPDATE / CALCULATE FIELD" condition feature. The formula required to calculate age remain same as above. Please check the screenshot below:

     

    You may also like to take a look the following demo form I created for your:  https://form.jotform.com/61287509002956 Feel free to clone this form for a closer look. The following guide should help you in form cloning:  https://www.jotform.com/help/42-How-to-Clone-an-Existing-Form-from-a-URL 

    Hope this helps.

    Do try it out and get back to us if you have any question.

    Thank you!