I can't seem to figure this out for some reason. I'm trying to import a .CSV file into SAS. It's a very large file (~20 million + records), so I can't easily change something in Excel, etc. The date appears in the format of MON-DD-YYYY, so an example is Jan-01-2008. How do I use an informat to make sure this gets into SAS properly?
I used Proc Import and then tried editing the code in the log to change the informat and nothing I'm doing gets the proper format. The closest I've gotten is just something like JAN2008, but no day. Thanks!
The anydtdte informat can handle it
data test;
date='Jan-01-2008';
newdate=input(date, anydtdte12.);
format newdate date9.;
run;
The anydtdte informat can handle it
data test;
date='Jan-01-2008';
newdate=input(date, anydtdte12.);
format newdate date9.;
run;
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.