02-10-2015 05:17 AM
I am trying to keep all dates in a table that occur between -365 to -30 days prior to Index date. Any dates occurring within 30 days of the Index are not required. I know this is probably quite straightforward code but I can't seem to figure out how to do this. Any help on the syntax would be appreciated. Many thanks.
02-10-2015 08:57 AM
Is index date a fixed date or a column in a dat set?
Assuming fixed date and variables that are SAS dates something like the following:
where (fixed_date - date) between 30 and 365;
You may need to change signs or order of subtraction.