how to add fixed amount of minutes, to hours.
Hello.
我需要添加一个固定数量的minutes, to an attribute columm, that contains hours.
So if myhourattribute contains 12:00 for instance, it should contain 12:15 after the operation, in case I want to add 15 minutes.
Thanks a lot.
Best Answer
-
JEdward RapidMiner Certified Analyst, RapidMiner Certified Expert, MemberPosts:578Unicorn
There's an operator called 'Adjust Date' which is very simple to configure.
Select the attribute you want to adjust, select the unit you want to add(or subtract) in this case minutes, next type in the adjustment value.
For more complex calculations or to convert your hour column if it is stored as nominal then the Generate Attribute operator is your friend. Here you can type something like:
date_str_custom(
date_add(
date_parse_custom(myTimeAtt,"HH:mm"),15,DATE_UNIT_MINUTE
)
,"HH:mm")This will convert your nominal value into a date add 15 minutes and then convert it back into a nominal value.
4
Answers
I ve got ¨PROBLEM OCCURRED¨ withAdjust Dateoperator related with the value type of myHOURatt.
But I could make it with generate att n the proposed expression:
solved
ThanksJEdwardfor your help.
Cheers!