How can I create a new atribute that show the age of people to a specific date?
Tdragi13
New Altair Community Member
Best Answer
-
Hi @Tdragi13
Please read this Thread
Calculating time difference in days between two dates — RapidMiner Community
You can use the Generate Attribute operator and then the function datediff(), e.g
date_diff([Date],date_parse_custom("04.03.2021","dd.MM.yyyy"))
where [Date] is your Datetime attibute (Colum)
Remember that datediff function return the difference in miliseconds, so if you need the difference in days or other units you need to divide it e.g
(date_diff([Date],date_parse_custom("04.03.2021","dd.MM.yyyy")))*1.15741e-8 for days
regards
0
Answers
-
Hi @ceaperez,
I need to generate a new discrete attribute, which indicates the age of people on a specific date. And for this, I need to use date operators.
The data must be taken from a column call "Date of birth" from the database.
So for example. I need a new attribute which shows me the age of the people up to the 4/03/2021
Thankss0 -
Hi @Tdragi13
Please read this Thread
Calculating time difference in days between two dates — RapidMiner Community
You can use the Generate Attribute operator and then the function datediff(), e.g
date_diff([Date],date_parse_custom("04.03.2021","dd.MM.yyyy"))
where [Date] is your Datetime attibute (Colum)
Remember that datediff function return the difference in miliseconds, so if you need the difference in days or other units you need to divide it e.g
(date_diff([Date],date_parse_custom("04.03.2021","dd.MM.yyyy")))*1.15741e-8 for days
regards
0