How can I calculate a person's age if they give me their date of birth?

  • pulloaelizondo
    Fecha de consulta 6 de junio de 2024, 20:56

    Deseo que me ayuden con Cómo puedo calcular la edad de una persona si me da la fecha de nacimiento 

  • Marehlene_B Jotform Support
    Fecha de respuesta 6 de junio de 2024, 23:25

    Hi Pablo,

    Thanks for reaching out to Jotform Support. Our Spanish Support agents are busy helping other Jotform users right now, so I'll try to help you in English using Google Translate, but you can reply in whichever language you feel comfortable using. Or, if you'd rather have support in Spanish, let us know and we can have them do that. But, it might take a while until they're available again.

    Now, coming back to your question, add two date picker fields and set the first to the current date and the second to get the date of birth. Next, we'll create conditional logic such that when the Date of Birth field is filled out, the age is calculated. Let me walk you through it:

    • Add the first Date Picker, set it to the Current Date, and Hide the field. 

    How can I calculate a persons age if they give me their date of birth? Image 1 Screenshot 70

    • Add another Date Picker and disable Future Dates. 

    How can I calculate a persons age if they give me their date of birth? Image 2 Screenshot 81

    • Add a Short Text or Number field that will be used to pass the calculation and set it to read-only. 

    How can I calculate a persons age if they give me their date of birth? Image 3 Screenshot 92

    • We will not create a Update/Calculate field condtion.

    How can I calculate a persons age if they give me their date of birth? Image 4 Screenshot 103See the screencast below to learn how to set up the calculation. 

    How can I calculate a persons age if they give me their date of birth? Image 5 Screenshot 114

    How can I calculate a persons age if they give me their date of birth? Image 6 Screenshot 125Here's my demo form that you can check out.

    Give it a try and let us know if you have any other questions.