Due to recent updates, all users are required to create an Altair One account to login to the RapidMiner community. Click the Register button to create your account using the same email that you have previously used to login to the RapidMiner community. This will ensure that any previously created content will be synced to your Altair One account. Once you login, you will be asked to provide a username that identifies you to other Community users. Email us at Community with questions.
Add week to any date and generate attribute
I have one column like
And One starting Date something like 01/01/2018.
I have to generate one new attribute "54_week" which will be my starting date(01/01/2018) + 54 week
And then make one new attribute "FLag" with condition IF(SVC_dt<=54_week,1,0)
And One starting Date something like 01/01/2018.
I have to generate one new attribute "54_week" which will be my starting date(01/01/2018) + 54 week
And then make one new attribute "FLag" with condition IF(SVC_dt<=54_week,1,0)
Tagged:
0
Best Answer
-
hbajpai Member Posts: 102 UnicornHey @pallav,
You can generate a new attribute with date_add function that will add 54 weeks to the existing attribute. The flag attribute can be created easily by using date_before or date_after functions in generate attributes, you can use date_diff which is more precise and returns delta time in ms.date_add(Col,54,DATE_UNIT_WEEK)
Best,
Harshit5