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

  • Profile Image
    jonstachelrodt
    Asked on March 28, 2019 at 07: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?

  • Profile Image
    Mike_G
    Answered 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.

  • Profile Image
    jonstachelrodt
    Answered on March 29, 2019 at 02:22 PM

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


    https://form.jotform.com/90857842786172

  • Profile Image
    jonstachelrodt
    Answered on March 29, 2019 at 03: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!