BookmarkSubscribeRSS Feed
Gil_
Quartz | Level 8
Hi I want to import a file that will be automate the file has the day the file ran for example pop 05-14-17
How do I auto import where I need the most current file that is dated ? Thanks
2 REPLIES 2
Reeza
Super User

You find a way to identify the most recent file then import that file. How do you currently identify the most recent file?

You need to provide WAY more information if you want anything beyond this. 

 

Also, search on here, there's been some very recent posts asking almost the identical question, based on a guess of what you're trying to do. But you can't code of guesses. 

Gil_
Quartz | Level 8
My import function looks like this

Proc import out =bird
Datafile="\\bird\bird.xlsx"
DBms=excel replace;
Sheet="bird";
Getnames=yes;
Rin;

The files currently looks like this I would need the most current one
Bird-05-14-17.xlsx
Bird-05-13-17.xlsx
Bird-05-12-17.xlsx

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 415 views
  • 0 likes
  • 2 in conversation