Calculating a baby's age in days, months, years?

  • jonstachelrodt
    Asked on March 28, 2019 at 7:17 PM

    I have discovered how to use the Calculation widget to determine age in days or in years.


    But I need to calculate age in days, months, and years. I need to know that a person is 14 days, 3 months, 1 years old, for example.


    How can I achieve this?

  • Mike_G JotForm Support
    Replied on March 28, 2019 at 10:39 PM

    Following the instructions in this guide — Mastering-Date-and-Time-Calculation

    I was able to create this Sample Form that I believe meets your requirement.

    https://form.jotform.com/90868811951972

    I would suggest that you create a clone of that Sample Form in your account so you can inspect it.


    How-to-Clone-an-Existing-Form-from-a-URL

    Normally, only the Birthday field is shown on the form and the text below will appear conditionally when the Birthday field is filled. But for testing purposes, I did not hide the other fields yet.

    If you have other questions or concerns, please feel free to let us know.

  • jonstachelrodt
    Replied on March 29, 2019 at 2:22 PM

    I've copied your code exactly, but it doesn't seem to work.


    https://form.jotform.com/90857842786172

  • jonstachelrodt
    Replied on March 29, 2019 at 3:40 PM

    Solved. Thank you.


    I discovered you have to click 'save' to save the code in a Form Calculation Widget. It does not save automatically!