FILEDATE Function

Checks the creation or modification date of a file.

Category: External File
Returned data type: Character
Note: The returned value is a date.

Syntax

FILEDATE(<filename,>< datetype>)

Required Argument

filename

a string representing the name of the file for which the creation or modification date needs to be retrieved; this can be specified as a fixed string, field name, or expression.

Optional Argument

datetype

a Boolean that specifies whether the creation date or the modification date needs to be returned; this can be specified as a fixed string, field name, or expression [true = modification date, false = creation date].

Details

The FILEDATE function returns either the creation date or the most recent modification date of a file. If the file does not exist a (null) value is returned. If the argument DATETYPE is omitted, the function behaves like the value would have been specified as false.

Example

string filename
date creation_date
date modification_date
 
filename="C:\mydata.txt"
 
modification_date = filedate(filename, true)
creation_date = filedate(filename, false)