Obtaining a creation date of an excel file

hughess7

Registered User.
Local time
Today, 18:28
Joined
Dec 2, 2010
Messages
27
Hi all, I want to use the create date of a file which is stored as a linked table in my Access 2010 database. What is the best way to achieve this?

I have attempted this by creating a query (qrysysObjects) using the MsysObjects and that gives me the filename of the linked tables, well almost - a few are csv files and this does not have the file name in the database field text, but I have found it in the foreignname field except it is name#csv rather than name.csv so I can't simply concatenate this in a query.

I know there is a function called FileDateTime which you can use in vba or a query but can you use a variable with this rather than the actual path name? I tried this in the query qrySysObjects but it said unknown function.

Am I on the right track at all or is there a better/easier way?

Thanks...
 
FileDateTime is a function of VBA, it should recognize, try using it in the immediate window, see if it recognizes the function if not, try adding the FileSystemObject to your VBA application.
 
I read you can use it in a query, I'm trying to add the date to a query to use later in vba
 

Users who are viewing this thread

Back
Top Bottom