Table of contents
TOC
Collapse the table of content
Expand the table of content

FileDateTime Function

office 365 dev account|Last Updated: 6/12/2017
|
1 Contributor

Returns a Variant ( Date ) that indicates the date and time when a file was created or last modified. SyntaxFileDateTime(pathname) The required pathnameargument is astring expression that specifies a file name. The pathname may include the directory or folder, and the drive.

Example

This example uses the FileDateTime function to determine the date and time a file was created or last modified. The format of the date and time displayed is based on the locale settings of your system.

Dim MyStamp
' Assume TESTFILE was last modified on February 12, 1993 at 4:35:47 PM.
' Assume English/U.S. locale settings.
MyStamp = FileDateTime("TESTFILE")    ' Returns "2/12/93 4:35:47 PM".
© 2017 Microsoft