BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hi All,

I use the 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;


Log Error:- Expecting an arithmetic operator.


Kindly suggest.
K
1 REPLY 1
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
On the topic of using a "time value" constant, review the SAS doc on the topic here:

Google advanced search argument: time value constant site:sas.com

Also, regarding the truncated post, you will need to "edit your existing post" (see the EDIT icon adjacent to the REPLY link), and review this related post on limits with certain data characters (recommend bookmarking the link for future reference).

http://support.sas.com/forums/thread.jspa?messageID=27609

Also, if you are going to post a SAS error condition, do so with a COPY / PASTE directly from your SAS log, revealing all related SAS-executed code, not just statements from our source program.

Scott Barry
SBBWorks, Inc. Message was edited by: sbb

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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