Due to recent updates, all users are required to create an Altair One account to login to the RapidMiner community. Click the Register button to create your account using the same email that you have previously used to login to the RapidMiner community. This will ensure that any previously created content will be synced to your Altair One account. Once you login, you will be asked to provide a username that identifies you to other Community users. Email us at Community with questions.

How to compute age from Birthdate

Hayashi87Hayashi87 Member Posts: 4 Contributor I
edited December 2018 in Help

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

Answers

  • Thomas_OttThomas_Ott RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 1,761 Unicorn

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

  • Hayashi87Hayashi87 Member Posts: 4 Contributor I

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

  • Thomas_OttThomas_Ott RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 1,761 Unicorn

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

Sign In or Register to comment.