VBA FileDateTime function

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)

FileDateTime Function Description

The VBA FileDateTime function returns the date and time of when a file or directory was created or last modified. The FileDateTime functions works for both files and directories.


The syntax for the FileDateTime function in VBA is:


The path to a file name that you wish to retrieve the created or last modified date for.

Other Notes

The FileDateTime function will return a Date Data Type variable. Use the Format Function to format the date appropriately.

Example usage

The FileDateTime function can be used in VBA. Let’s look at some FileDateTime function examples:

Simply the best place to learn Excel VBA