Hi:
As I explained in a previous post, when you have syntax constructions like < or > or <= , then you must follow the guidelines laid out in the forum posting to which you were previously referred (on July 12 and shown below)
In that forum posting, it explains that you need to REPLACE < with < in your code or <= with <= or with LE.
Otherwise, your code will get truncated and no one will be able to help you. And, yes, it is sort of a pain to do this extra bit of work to post your code, but if you want folks to help you, it is a courtesy to pay attention to what people post and to show that you understand what they are trying to tell you.
For example, you might have wanted to show us something like this:
[pre]
data Week;
set Day;
IF ("1/01/2001" <= Date <= "7/01/2001") then Week= 'Week1';
...more code...
[/pre]
but if you had <= in your code the < would have messed up the forum posting. (And the reason it didn't mess up my code is that I followed the suggestion in the forum topic on preventing special characters from truncating your posting.)
If, for example, you tried an IF statement like this, there is an automatic problem if DATE is a SAS date variable. SAS expects any comparisons to a DATE variable to be done either as the numeric value or as the DATE7 or DATE9 version of the date like this (showing an equality test...not a "between" test):
[pre]
IF DATE = '01JAN2001'd then ...;
or
IF DATE = 14976 then ....;
[/pre]
Previous forum postings on the subject of date and date/time variables:
http://support.sas.com/forums/message.jspa?messageID=39424#39424
http://support.sas.com/forums/thread.jspa?messageID=33006胮
Previous forum postings on how to post code with special characters such as < and >
http://support.sas.com/forums/thread.jspa?messageID=27609 (someone already sent you this posting to read on July 12)
http://support.sas.com/forums/message.jspa?messageID=39361#39361
cynthia