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!
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
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.
Ready to level-up your skills? Choose your own adventure.