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!
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: