Options
How can i substract a 1 month to a example that is a date?
Best Answers
-
OptionsTelcontar120 Moderator, RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 1,635 UnicornThere are many ways to accomplish this in RapidMiner. If your attributes are defined as date/time types, then one way would be use the datediff function inside Generate Attributes and simply convert from milliseconds to months (and then potentially round that number in some way).
Another way would be to use Date to Numerical to get the month number of your date/time stamps and then do ordinary subtraction (with an adjustment to handle the possible negative values).
7 -
OptionsIngoRM Administrator, Moderator, Employee, RapidMiner Certified Analyst, RapidMiner Certified Expert, Community Manager, RMResearcher, Member, University Professor Posts: 1,751 RM FounderHi,You could divide the MS by something like (30*24*60*60*1000) which is the total number of MS in 30 days.Hope this helps,
Ingo6
Answers
As in attached example : I used two (generated) dates, one is now and the other is like 2 months ago (50 days difference). this gives a number for each month (be aware that for some strange reason month numbers start with 0 for January instead of 1)