RapidMiner 9.7 is Now Available

Lots of amazing new improvements including true version control! Learn more about what's new here.


How to calculate Difference between time intervals?

pantangi_shekarpantangi_shekar Member Posts: 9 Contributor I
edited December 2018 in Help

Hello all,


Is there a way to caliculate the time difference between two intervals in rapid miner?


For example,


I have two columns in my dataset named ADMISSION_DATE and DISCHARGE_DATE. I want to know the difference between those two dates in number of days.


Admission_date               Discharge_time

JAN 14 2017                    JAN 18 2017


I need to have an other column like this





Thanks in advance.




Best Answer

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

    Yes, use a Generate Attributes operator and the date_diff function. Just make sure that RapidMiner has those dates in the date-time format. 



  • Telcontar120Telcontar120 Moderator, RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 1,497   Unicorn

    Note that the default unit for date difference is in milliseconds.  So if you want it in days you will need to divide by the appropriate conversion factor.

    Brian T.
    Lindon Ventures 
    Data Science Consulting from Certified RapidMiner Experts
Sign In or Register to comment.