Calculate Age via Birth Date

  • Profile Image
    kekepikentron
    Asked on June 17, 2014 at 05:00 AM

    Hallo,

    i would like to calculate age via birth date picker. I saw some previous issues in Forum, but the problem is that we would like the user to choose the birth date from drop-down list (as it is in birth date picker) and not from calendar (as it appears through date picker).

     

    Is this possible? Waiting for your answer.

     

    Sincerely,

    TIMOTHEOS TSAKALOS

    WWW.VOUCHERNEWS.GR

  • Profile Image
    Carina
    Answered on June 17, 2014 at 11:30 AM

    I believe it is not possible, because in order to determine the age we need an extra date field that gets the today default date, so we can subtract from the birthdate. And the only date field that has the default date option is the DateTime field which uses numeric values for months, as the BirthDate Picker uses text values for months.

    I forwarded a feature request to our developer's team so they can take into consideration a future implementation. They will contact you via this thread once they have an update on this.

    You can check and clone this test form:

    http://form.jotformpro.com/form/41674661121955?

    There is a hidden DateTime field that has the default time on and in the calculation field we subtract the today field for the birthday and then divide it by 365 (days) to get the years:

    Let us know if further support is needed.

  • Profile Image
    kingfisherweddings
    Answered on April 08, 2015 at 11:17 AM

    Can I please be contacted when this feature becomes available. I so much would benefit from this feature.
  • Profile Image
    Carina
    Answered on April 08, 2015 at 12:27 PM

    @kingfisherweddings

    I moved your request to a new thread so it can be properly addressed:

    http://www.jotform.com/answers/548432 

    Let us know if we can assist you further.  

  • Profile Image
    Carina
    Answered on April 08, 2015 at 12:36 PM

    Actually this already can be done by adding 2 datefields, one of them with default date of today:

    Then add a form calculation widget with the formula (todayfield-birthdatefield)/365:

    You can test and clone the demo form: 

    http://form.jotformpro.com/form/50974521706962? 

    Let us know if we can assist you further.   

  • Profile Image
    kingfisherweddings
    Answered on April 08, 2015 at 12:59 PM

    It doesn't work because the birth date format contains text ( january, february) and the today date contains numbers ( 01/02)

    Well at least i cannot get it to work :(

    http://www.jotform.co/kingfisherweddings/wedding_application

  • Profile Image
    Carina
    Answered on April 08, 2015 at 01:14 PM

    The date format is not the same. You have ddmm and on the other you have mmdd:

    Let us know if the problem persists.

  • Profile Image
    dmilling0112
    Answered on May 08, 2015 at 11:35 PM

    i am just starting to use the calculation in a form i am testing. However, I am finding that in my browsers, the calculation is not happening unless I "refresh" my screen.   In the Jotform site, when I test it, it calculates real-time, but not when I have it embedded in my HTML code.

    I need it real-time because I have a couple other fields that are dependent on the age calculation.

    Any advice?

  • Profile Image
    Boris
    Answered on May 09, 2015 at 04:10 AM

    Hello.

    It sounds as there might be some conflict between our form's scripts and the scripts on your page.

    Can you please try embedding the form as an iFrame embed, and see if that resolves the issue in automatic calculation?

    It would also help if you could provide us with the link to the page where you have embedded the form, so that we may take a look into what is going wrong with the calculation. Please let us know, we will be glad to assist you.

    With kind regards,
    Boris

  • Profile Image
    wsfarm
    Answered on May 09, 2015 at 11:56 AM

    Here is a solution using the Birth Picker:

    http://www.jotform.com/form-templates/age-calc-accurate-using-birth-picker

    As far as I can tell it is accurate. It is based on the template mentioned above, but uses the Birth Picker and is accurate (at least within one day).

    Cheers

    Charlie

    wsfarm

  • Profile Image
    Shadae
    Answered on May 09, 2015 at 03:05 PM

    Hi wsfarm,

    Thank you for your valuable input in finding a solution to getting calculations done with the birth picker.

    Please feel free to contact us if you need any assistance.

    Thank you.