Home
Discussions
Community Q&A
How can I create a new atribute that show the age of people to a specific date?
Tdragi13
I need to create a new atribute, and show the age of the people of my database on a specific date? Can I do it with date operators?
Find more posts tagged with
AI Studio
Operators
Databases
Accepted answers
Caperez
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
All comments
Caperez
Hi
@Tdragi13
,
Do you need to calculate the age based in a datetime atribute from database?
Regards
Tdragi13
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
Thankss
Caperez
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
Quick Links
All Categories
Recent Discussions
Activity
Unanswered
日本語 (Japanese)
한국어(Korean)