Altair RISE

A program to recognize and reward our most engaged community members
Nominate Yourself Now!

How can i substract a 1 month to a example that is a date?

User: "cdaponte"
New Altair Community Member
Updated by Jocelyn
I´m using generate attributes operator and i want to create an attribute that if a date es 1 month before a certain day it returns me "1", and if it is 2 month before it returns me "2", and so on till "6". How can i do this? 

Thank you!!!

Find more posts tagged with

Sort by:
1 - 2 of 21
    User: "Telcontar120"
    New Altair Community Member
    Accepted Answer
    There 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).


    User: "IngoRM"
    New Altair Community Member
    Accepted Answer
    Hi,
    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,
    Ingo