How to calculate age?

  • Profile Image
    jskus
    Asked on September 20, 2015 at 12:00 AM

    in your forum when i put up date of birth age automatically not showing what is the process for this action kindly tell me?

  • Profile Image
    Amber 
    Answered on September 20, 2015 at 06:39 AM

    Would this be of any help?

  • Profile Image
    ashwin_d
    Answered on September 21, 2015 at 01:04 AM

    Hello jskus,

    Unfortunately, we do not have any widgets to calculate Age but with a little workaround it is possible to achieve your requirement.

    You can take advantage of our "Form Calculation" widget to calculate the age. Here are the steps you should follow:

    #1. Add a date time field in your form and set the default date as today's date.

    #2. Add another date time field where user can select date of birth.

    #3. Add "Form Calculation" widget in form and set the formula to calculate the age. Please check the screenshot below: 

     

    Hope this helps.

    Do get back to us if you have any questions.

    Thank you!

  • Profile Image
    jskus
    Answered on September 21, 2015 at 02:59 AM

    hello

       its working perfect but result of calculation is showing like 24.5, 26.7 etc how it will show in full figure like 24, 25 etc faction figure will not showing after calculation , kindly tell us.

  • Profile Image
    ashwin_d
    Answered on September 21, 2015 at 07:14 AM

    Hello jskus,

    You will have to edit the "Form Calculation" widget and set the "Decimal Places in Numerical Results" property to "0". Please check the screenshot below on steps to make this change in the form calculation widget:

     

    Hope this helps.

    Do get back to us if you have any questions.

    Thank you!

  • Profile Image
    veshman
    Answered on October 10, 2015 at 01:46 PM

    I'm having trouble getting the correct Age in years. I've used the formula as shown, but the result I'm getting is not completely accurate. It's off by one year. Oddly, when the DOB month is before the current month, the age is higher, and when the DOB month is after the current month, the age is lower.

     

  • Profile Image
    ashwin_d
    Answered on October 11, 2015 at 06:26 AM

    Hello veshman,

    I have moved your question to a new thread and you will be answered here:  http://www.jotform.com/answers/678341020 

    Thank you!

  • Profile Image
    ashwin_d
    Answered on October 12, 2015 at 07:14 AM

    Hello Randy,

    Thank you for your response here. 

    One of my colleague have also explained this in the other thread. The reason you are not able to open that thread because it is a private thread. 

    Thank you!

  • Profile Image
    ashwin_d
    Answered on October 12, 2015 at 12:19 PM

    Hello drpatel,

    I am glad to know that the workaround shared in the other thread worked for you.

    Do get back to us if you have any questions.

    Thank you!