Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IMPORT FILE ACCORDINT TO DATE OF MONTH 1

Status
Not open for further replies.

villica

Programmer
Feb 25, 2000
332
CA
I can't seem to figure out this one one
On a daily basis an excel file gets exported to an access table. Exporting the file is the easy part. this is my issue. the files are name according to the date
for example. todays file is call open030206, yesterday was called open030206.
So today I need to export the file that was created yesterday 030106. Yesterday I need it to export 022806. It gets tricky because a different month. Any ideas how can i do this.

suggestions please

thanks
Ana

villica
 
Format(Date(),"mmddyy") returns 030206 today.

Format(Date()-1,"mmddyy") returns 030106 today.

"Open" & Format(Date()-1,"mmddyy") returns Open030106 today.

In other words, you can always use "Open" & Format(Date()-1,"mmddyy") in either VBA or a query to return the string you need.

[pc2]
 
thank you so much. it works great

villica
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top