FDate(), FTime()
These functions return the date
and time a file was last updated, according to the operating
system.
Usage
|
dLastDate = FDATE( cFileName )
cLastTime = FTIME( cFileName )
|
cFileName may include a path. If not, FoxPro looks first
in the default directory, then along the FoxPro path.
Example
|
? FDATE("WinWord.EXE") && Returns 7/11/97 for Word 97 SR-1
? FTIME("WinWord.EXE") && Returns 12:00:00 AM for Word 97 SR-1
|
Now that we have DateTime data, it would be nice to
return the file date and time as a single string. On the other
hand, adding FDateTime() to the language would be another case of
unnecessary dBloat. It's easy enough to write your own using the
conversion shown under CTOT(). Or you could just use ADIR(),
which not only returns both date and time, but is well-behaved if
the file doesn't exist.
Back to Table of Contents
Copyright © 2002-2018 by Tamar E. Granor,
Ted Roche, Doug Hennig, and Della Martin. Click for license
.