Help using Base SAS procedures

Where Clause Date Error

Reply
N/A
Posts: 0

Where Clause Date Error

How do I correct the error noted below. Thanks

The sale date variable is formated as below:
informat sale mmddyy10.

101 WHERE (ST = 'WY') AND (sale BETWEEN '07/31/08' AND '06/30/09') ;
ERROR: Where clause operator requires compatible variables.
102 run;
Super Contributor
Posts: 359

Re: Where Clause Date Error

Posted in reply to deleted_user
WHERE (ST = 'WY') AND (sale BETWEEN '31/JUL/08'D AND '30/JUN/09'D) ;

You need to convert the dates to SAS dates.
Ask a Question
Discussion stats
  • 1 reply
  • 408 views
  • 0 likes
  • 2 in conversation