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.
How to replace a time value
Hi dears
I've struggled to change a certain of time value for almost one day, which is turning the "12:00:00 AM" into "12:00:00 PM", I 've used "Date to nominal" to deal with it, but after doing so the time value would be changed, so I gave up this method.
Now I am trying to use "Generate Macro", but I have no idea how to write the function expression, could you please tell me?
Sincerely,
Starfish
I've struggled to change a certain of time value for almost one day, which is turning the "12:00:00 AM" into "12:00:00 PM", I 've used "Date to nominal" to deal with it, but after doing so the time value would be changed, so I gave up this method.
Now I am trying to use "Generate Macro", but I have no idea how to write the function expression, could you please tell me?
Sincerely,
Starfish
Tagged:
0
Best Answer
-
ceaperez Member Posts: 541 UnicornHi @Starfish,you can use the Generate Attributes to create a new attribute and use an if statement with date_get method and DATE_UNIT_HOUR to extract the date hour, compare it with your target value and replace it with the new value.if(date_get([Date], DATE_UNIT_HOUR)==9,(date_set([Date],10, DATE_UNIT_HOUR )),date_get([Date], DATE_UNIT_HOUR))
Best,
Cesar0