05-29-2013 02:55 PM
I have year variable under which there are many different years
I want to do a report on this dataset and for each year seperately
since year is numeric i cannot use it in the where statement inside the PROC REPORT
when i convert to charecter in the datastep and then use it in the where statement inside the report it says :there were 0 observations where year is 2011
Could you tell me where i went wrong??
05-29-2013 03:00 PM
OK I found my mistake...
There were some leading spaces
Could someone help me do all the three things together while extracting year from the date variable????
05-29-2013 03:26 PM
Instead of the 4. if i used best. I am getting leading spaces. Why is that? and could you also show me how to strip in the same line
Is the below one right ??
05-29-2013 03:41 PM
You're making your life way too complicated. Of course you can use a WHERE statement on a numeric variable:
Just don't use quotes when referring to a numeric value.
Need further help from the community? Please ask a new question.