In Access, the FileDateTime function returns the date and time when a file was created or last modified.
The syntax for the FileDateTime function is:
FileDateTime( pathname )
The required pathname argument is a string expression that specifies a file name. The pathname may include the directory or folder, and the drive.
Example
|
VBA Code
|
Now the result variable would contain the create or last modified date for the examples.mdb file. The format of the date and time displayed is based on the locale settings of your system.
SQL query
You can also use the FileDateTime function in a query.
|
Note:
This function cannot be used in expressions when Access is operating in safe mode.