how to calculate age using condition

  • akmaleddy
    Asked on January 17, 2017 at 7:43 AM
  • Ian
    Replied on January 17, 2017 at 9:23 AM

    Here is the demo : https://form.jotform.com/61880675038968

    Feel free to clone this form so you can figure out the whole setup.

    Guide: https://www.jotform.com/help/28-Cloning-a-Form-from-a-Web-Page

    --

    Basically, what you need 2 datetime fields and 2 form calculation fields.

    Here are the screenshots: Make sure to enable the default date on the 2 datetime fields.

    how to calculate age using condition Image 1 Screenshot 50

     

    You need to define the formula on each of the calculation field.

    how to calculate age using condition Image 2 Screenshot 61

    The first calculation field (Days) gets the number of days, here's the formula:

    how to calculate age using condition Image 3 Screenshot 72

    On the second calculation field (Age), this will calculate the Age base from the given birth date of the user using math Floor function.

    how to calculate age using condition Image 4 Screenshot 83

    If you need further assistance, do let us know.

  • akmaleddy
    Replied on January 17, 2017 at 10:45 AM
    can you give me the formula?
    2017-01-17 21:23 GMT+07:00 JotForm :
    ...
  • David JotForm Support Manager
    Replied on January 17, 2017 at 12:03 PM

    The formulas are listed in the step by step example my colleague has provided.

     

    how to calculate age using condition Image 1 Screenshot 30

    how to calculate age using condition Image 2 Screenshot 41

    You can clone his form if you want to: https://www.jotform.com/help/42-How-to-Clone-an-Existing-Form-from-a-URL 

    URL to the form: https://form.jotform.com/61880675038968 

    Let us know if you need more help.

  • akmaleddy
    Replied on January 17, 2017 at 1:09 PM

    thank u for your help