🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

Calculating time difference in days between two dates

User: "felix_w"
New Altair Community Member
Updated by Jocelyn

Dear Rapidminer Community, 

 

I am struggling on a very simple problem. I am trying to calculate the difference in days between two dates. I know there is a function called "date_diff" in generate attributes but I dont know how to enter a correct date. 

 

No I don't have the two dates in seperate columns, I only have the date in the above format in one column and I know the end date (24.12.2016). 

 

E.g. I want to calculate the date difference between 25.08.2016 and 24.12.2016 (German date format). How do I enter a correct format like this in rapidminer in the date_diff function? 

 

Best regards

Felix

Find more posts tagged with

Sort by:
1 - 1 of 11
    User: "MartinLiebig"
    Altair Employee
    Accepted Answer

    Hi @felix_w,

    it works like that:

    date_diff(dateAttribute,date_parse_custom("24.12.2016","dd.MM.yyyy"))

    note that you can get the current timestamp with date_now().

     

    Best,

    Martin