Using sashelp.Stocks as an example as no data is provided:
data stocks;
set sashelp.stocks (obs=30 where =( '01Jan1990'd <= date <= '31Dec1995'd));
run;
Log:
1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
68
69 data stocks;
70 set sashelp.stocks (obs=30 where =( '01Jan1990'd <= date <= '31Dec1995'd));
71 run;
NOTE: There were 30 observations read from the data set SASHELP.STOCKS.
WHERE (date>='01JAN1990'D and date<='31DEC1995'D);
NOTE: The data set WORK.STOCKS has 30 observations and 8 variables.
@Jallah_Kennedy wrote:
Please help me with selecting record from a certain date range. The variable is Comp_Date (formatted already as a date) and I want to select (e.g. 20, 30...) records to view all with all of the other variables.
Thanks.