02-27-2013 01:56 PM
Good afternoon eveyrone!
I am stuck on what is now a complicated project. I'm trying to create this new variable for an analysis I am trying to run. Please help!
02-27-2013 01:58 PM
You have to provide more information.
What does your data look like. Is the certain amount fixed or variable? Are you doing this once or many times...
Sample data and output is good.
02-27-2013 02:39 PM
If you need this earliest date for each observation, it's relatively easy:
earliest_date = min(birth_date, graduation_date, retirement_date, start_date, end_date, event_date);
If you need something else, you'll have to explain more.
02-27-2013 06:33 PM
Similarly to what Astounding said, going a different path, if you need to look at a column and then determine what the minimum date was within that column, proc sql is an easy solution.
create table earliest_date as
if you need this by different groupings, then you can add that with a group by statement and then merge back onto your original data.