If a date variable is greater than 2/10/2014 by 7 days, then I would like to output the row to a new table. Anything under 7 days, do not output. How would go about doing this in SAS?
data before after;
set input;
if date - "10FEB2014"d > 7 then
output after;
else
output before;
run;
Dates are numeric variables represented as the number of days from an epoc (1/1/1960 I believe). So simple adding and subtracting works well.
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.OkRead more