|
|
|
|
- Modifying the date and time associated with a file
- Handling errors
- Operating mode in the different operating systems
- Operating mode in Windows Vista (and later)
fDate (Function) In french: fDate Returns or modifies the different dates associated with a file or directory (date created, modified or accessed).
Syntax
<Result> = fDate(<File or directory path> [, <New date> [, <Type of date>]])
<Result>: Character string - Date associated with the file or directory (in YYYYMMDD format),
- Empty string ("") if an error occurred. To get more details on the error, use ErrorInfo.
ErrorInfo cannot be used to identify the error.
<File or directory path>: Character string - Name and full (or relative) path of the 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.
<New date>: Optional character string - Modifying a date: new date associated with the file or directory (in YYYYMMDD format).
- Reading a date: empty string ("").
<Type of date>: Optional constant Indicates the date to handle: | | fAccess | Date of last access to the file or directory. | fCreation | Creation date of the file or directory. | fModify (Default value) | Date of the last modification made to a file or directory. |
Remarks Modifying the date and time associated with a file To modify the date and time associated with a file, you have the ability to use fDateTime. Remark: You also have the ability to use fDate and fTime successively. However, fDateTime is faster. fDate throws 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 (or 1970 in Java),
- the format of <New date> is incorrect.
- ...
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|