How to compute age from Birthdate

Hayashi87
Hayashi87 New Altair Community Member
edited November 5 in Community Q&A

I have a birthdate field in dd/mm/yyyy? How do you compute age using Generate Attributes?

Tagged:

Answers

  • Thomas_Ott
    Thomas_Ott New Altair Community Member

    date_diff(date_now(),birthday)/(1000*60*60*24*365.25)

  • Hayashi87
    Hayashi87 New Altair Community Member

    Thanks Thomas, any idea why I am getting negative values and decimal in my age field?

  • Thomas_Ott
    Thomas_Ott New Altair Community Member

    Try '(Birthday,date_now())' instead. I went off my faulty memory, check the date_diff() function requirements.