Checks the creation or modification date of a file.
Category: | External File |
Returned data type: | Character |
Note: | The returned value is a date. |
filedate(<filename,><datetype>)
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.
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].
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 parameter datetype is omitted the function behaves like the value would have been specified as false.
string filename
date creation_date
date modification_date
filename="C:\mydata.txt"
modification_date = filedate(filename, true)
creation_date = filedate(filename, false)