Months of a year to winter summer and fall
gohel
New Altair Community Member
Hi everyone,
I was trying to convert months(Jan, Feb, Mar....) into winter, summer and fall and using the below mentioned code in Generate attribute operator, But it's showing me the error shown below.
Can anyone help me out??
if(pickup_month<4,"winter",if(pickup_month<7,"summer",if(pickup_month<11,"Fall","winter")))
I was trying to convert months(Jan, Feb, Mar....) into winter, summer and fall and using the below mentioned code in Generate attribute operator, But it's showing me the error shown below.
Can anyone help me out??
if(pickup_month<4,"winter",if(pickup_month<7,"summer",if(pickup_month<11,"Fall","winter")))
Tagged:
0
Best Answer
-
Hi,
I tested your expression with generated data (pickup_month had the data type "integer") and Generate Attributes worked.
Make sure that your attribute is numeric. If it isn't, the < operator won't work.
Regards,
Balázs1
Answers
-
Hi,
I tested your expression with generated data (pickup_month had the data type "integer") and Generate Attributes worked.
Make sure that your attribute is numeric. If it isn't, the < operator won't work.
Regards,
Balázs1