Hi, I have a text file with a date with multiple date formats. Kind of what's created below in the sample data. I also created a picture format for the date format I need (further below). What I can't figure out is how to conditionally read in the file and maintain the data as a date. The final output needs to have the new date format (newdate.). I'm trying to avoid reading it in as a string then converting it later. Any ideas? Thanks! *sample data; data test; input date $10.; datalines; 01JUL2020 2020-07-01 ; run; *new data format. proc format; picture NewDate other='%Y-%0m-%0d' (datatype=date); run; %let now=%sysfunc(today(),newdate.); %put &now;
... View more