Age calculation from 2 dates

  • rmccoy
    Asked on May 8, 2016 at 8: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.  

  • Ashwin JotForm Support
    Replied on May 8, 2016 at 9: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:

    Age calculation from 2 dates Image 1 Screenshot 30

    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:

    Age calculation from 2 dates Image 2 Screenshot 41

     

    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!