How can I calculate age in years using the datetime_diff function in my table?

  • Erin_Nowak
    Asked on June 2, 2022 at 10:05 AM

    I would like to calculate age based on a birthday that is inputted. I'm not sure what I'm doing wrong in my screenshot, the numbers showing up are not correct. Ideally, it would display the age in years.

    Or, if there are any other ways to calculate age from a birthdate field, that would be helpful!

    Jotform Thread 4062495 Screenshot
  • Jeric JotForm Support
    Replied on June 2, 2022 at 10:56 AM

    Hello Erin_Nowak,

    Thanks for reaching out to Jotform Support. Please allow me some time to check the formula for you and as soon as I have an update, I'll let you know.


  • heyjosabet
    Replied on June 26, 2022 at 10:37 AM

    Did you have a solution? Because I need help too

  • Marvin_J
    Replied on June 26, 2022 at 1:01 PM

    Hi Erin,

    Thanks for reaching out to Jotform Support. We apologize for delay of response. I have cloned your form and look for the formula that best to your concern. Here's the best formula that I can provide.

    This formula will calculate the Child age and make sure the Birthday is the child birthdate field.


    1656262543 62b88f8f3e297  Screenshot 10

    1656262871 62b890d7a5486  Screenshot 21

    Give it a try and let us know how it goes.

  • heyjosabet
    Replied on June 26, 2022 at 1:24 PM

    1656264286 62b8965ebd736 Screenshot 2022 Screenshot 10

    I get this...

  • Marvin_J
    Replied on June 26, 2022 at 1:59 PM

    Hi Erin,

    Thanks for getting back to us. Is this the form that we are working on 221085504161042? Can you please send us a screenshot on how you adding the formula and the URL form that you are using. We’ve got a guide here explaining how to do that.

    While waiting for your reply. Please check the screencast.

    1656266374 62b89e86cc002  Screenshot 10

    Once we hear back from you, we'll be able to move forward with a solution.