- Equivalence and execution speed
- Managing errors
- Operating mode in the different operating systems
- Operating mode in Windows Vista (and later)
- Date and time of creation, modification or access
fDateTime (Function) In french: fDateHeure Syntax
<Result> = fDateTime(<Path of file / directory> [, <New date and time> [, <Type of date and time>]])
<Result>: Character string - Date and time associated with the file or directory (in YYYYMMDDHHMMSS format),
- Empty string ("") if an error occurred. To find out the error details, use ErrorInfo.
<Path of file / directory>: Character string (with quotes) - Name and full (or relative) path of file (up to 260 characters).
- Full (or relative) path of directory (up to 260 characters). If this parameter corresponds to a directory name, this name may (or may not) end with "\". A UNC path can be used.
Versions 15 and later New in version 15 Versions 17 and later New in version 17
<New date and time>: Optional character string (with quotes) - Modify a date and time: new date and time associated with the file or directory (in YYYYMMDDHHMMSS format).
- Read a date and time: empty string ("").
<Type of date and time>: Optional constant Specifies the date and the time to use:
| | fAccess | Date and time of last access to the file or directory. | fCreation | Date and time of file/directory creation. | fModify (Default value) | Date and time of last modification made to the file/directory. |
Remarks Equivalence and execution speed fDateTime is equivalent to fDate and fTime used successively. However, fDateTime is faster. fDateTime generates an error in the following cases: - the specified file is opened or the file is locked by another application,
- the specified file or directory does not exist,
- the name of the specified file is invalid,
- the year of one of the file dates is before 1980,
- the format of <New date and time> is incorrect.
- ...
Operating mode in the different operating systems The date and time of a file or directory cannot be modified in the following operating systems: Windows 98, Windows ME.
This page is also available for…
|
|
|