Hi All!
I have a dataset with 100+ date vairables and each observation may have 1 to 5 or so of those dates populated (all numeric date formats). I need a way to select the max date from each observation...where the dates have no standard naming convention (all random names). Can I do this with an array- or any other suggestion? THis was my attempt...but clearly not working 🙂
data all1;
set all;
array dt (*) _numeric_;
do i= 1 to dim(dt);
date1 =max(dt(i));
end;
run;
Here is a snapshot of the data...by keep in mind there are 100+ off these dates with all different names
Thak you!
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.