Returns the date stamp for a file, the date the file was last modified.

Syntax

<oRef>.date(<filename expC>)

<oRef>

A reference to a File object.

<filename expC>

The name of the file to check. Wildcard characters are not allowed; you must specify the actual file name.

If you specify a file without including its path, dBASE Plus looks for the file in the current directory, then in the search path(s) you specified with SET PATH, if any. If you specify a file without including its extension, dBASE Plus assumes no extension. If the named file cannot be found, an exception occurs.

Property of

File

Description

Use date( ) to determine the date on which the last change was made to a file on disk.

When you update a file, dBASE Plus changes the file’s date stamp to the current operating system date when the file is written to disk. For example, when the user edits a DB table, dBASE Plus changes the date stamp on the table file when the file is closed. date( ) reads the date stamp and returns its current value.

To get the date the file was created, use createDate( ). For the date the file was last accessed, use accessDate( ). To get the time the file was last changed, use time( ).