BookmarkSubscribeRSS Feed
deleted_user
Not applicable
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
1 REPLY 1
Peter_C
Rhodochrosite | Level 12
please change your message, replacing the "less than or equal to" symbols with " LE " and we might get the whole message

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 2059 views
  • 0 likes
  • 2 in conversation