Hello !
My date and time variable arrival is of the type, length, format and informat as below. An example of a data point is 5/22/2020 4:11:00 PM
#
Variable
Type
Len
Format
Informat
Arrival
Num
8
DATETIME.
ANYDTDTM40.
I used the code below for classification but it didn't work:
data B; set A; if arrival in (01/01/2019, 05/31/2019) then ARR=1; else if arrival in (01/01/2020, 05/31/2020) then ARR=2; run;
LOG
183 if arrival in (01/01/2019, 05/31/2019) then ARR=1; - 22 76 184 else if arrival in (01/01/2020, 05/31/2020) then ARR=2; - 22 76 ERROR 22-322: Syntax error, expecting one of the following: a quoted string, a numeric constant, a datetime constant, a missing value, iterator, (, ), ',', :.
ERROR 76-322: Syntax error, statement will be ignored.
... View more