Help using Base SAS procedures

calculating earliest among a group of dates

Reply
N/A
Posts: 0

calculating earliest among a group of dates

Hi All,

In a sas dataset, I have 4 different dates (as 4 columns), need to find the earliest date among those per observation.
Is there any better way to handle this (apart from recursive multiple if then else statements).Thanks.

Kumar.
Contributor Jay
Contributor
Posts: 24

Re: calculating earliest among a group of dates

Posted in reply to deleted_user
Dates are numbers, so use the min function in a data step.....

data a;
set b;
min_date=min(of date1-date4);
format min_date date8.;
run;
Ask a Question
Discussion stats
  • 1 reply
  • 105 views
  • 0 likes
  • 2 in conversation