My Assistant
![]()
Custom Search
|
![]() ![]() |
![]() |
![]() Post#1 | |
![]() | I'd like to create some code to import certain Excel files from a directory location into a new table. There are several Excel files created each day/hour and placed in a specific share drive location and named "Routing_Point_Closed_Report_2019-09-04_04-00-PM". How do I import where todays date matches the date in the file name and the time in the file name is 04-00-PM? Can someone offer some code for me? This post has been edited by slc1axj: Sep 4 2019, 04:09 PM |
![]() Post#2 | |
![]() UA Moderator Posts: 76,911 Joined: 19-June 07 From: SunnySandyEggo ![]() | Hi. By "latest," can we assume you mean by the "Modified Date" property? -------------------- Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas Access Website | Access Blog | Email |
![]() Post#3 | |
![]() | I've revised the post - I'm kinda wanting to search the file name in order to find the file to import into Access. |
![]() Post#4 | |
![]() UA Moderator Posts: 76,911 Joined: 19-June 07 From: SunnySandyEggo ![]() | Hi. You could try something like: CODE Dir("Routing_Point_Closed_Report_" & Format(Date(),"yyyy-mm-dd") & "_04-00-PM.xlsx") -------------------- Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas Access Website | Access Blog | Email |
![]() Post#5 | |
Posts: 3,368 Joined: 27-February 09 ![]() | ?Format(date(),"YYYY-MM-DD") &"_04-00-PM" 2019-09-04_04-00-PM |
![]()
Custom Search
|
![]() | Search Top Lo-Fi | 16th December 2019 - 02:10 AM |