Help using Base SAS procedures

Log Error: Expecting an arithmetic operator.

Reply
N/A
Posts: 0

Log Error: Expecting an arithmetic operator.

Hi All,

I use code:-

data segment;
set analyse;
if '00:00:08'<=time<='09:00:00' then time_new='Before 9 A.M.'
Else IF '09:01:00'<=time<='12:00:00' then time_new='Before Noon'
Else IF '12:01:00'<=time<='17:00:00' then time_new='After Noon'
Else IF '17:01:00'<=time<='21:00:00' then time_new='Evening'
Else IF '21:00:01'<=time<='24:00:00' then time_new='Evening';
run;

The time is a character variable of length 8 in the SAS dataset analyse.

Log Error:- Expecting an arithmetic operator.



Kindly suggest.
K
Valued Guide
Posts: 2,174

Re: Log Error: Expecting an arithmetic operator.

please change your message, replacing the "less than or equal to" symbols with " LE " and we might get the whole message
Ask a Question
Discussion stats
  • 1 reply
  • 1189 views
  • 0 likes
  • 2 in conversation