PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN

  • Equivalence and execution speed
  • Handling errors
  • Operating mode in the different operating systems
  • Operating mode in Windows Vista (and later)
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Returns or modifies the different dates and times associated with a file or directory (date created, modified or accessed).
WINDEVWEBDEV - Server codeReports and QueriesJavaUser code (UMC)PHPAjax
// Find out the date and time of file modification
ResDate = fDateTime("C:\MyDirectories\File.txt", "", fModify)
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 get more details on the error, use ErrorInfo.
<Path of file / directory>: Character string
  • 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.
AndroidAndroid Widget This parameter can correspond to a full path or a path relative to the current directory (returned by fCurrentDir). This parameter is case-sensitive.
Reminder: In Android, an application has the rights to write into its setup directory or into one of its subdirectories, as well as onto the external memory (SDCard).
iPhone/iPadIOS WidgetMac Catalyst This parameter can correspond to a full path or a path relative to the current directory (returned by fCurrentDir). This parameter is case-sensitive.
Reminder: On iPhone/iPad, an application has the rights to write into its setup directory or into one of its subdirectories.
<New date and time>: Optional character string
  • Modify a date and time: new date and time of 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:
fAccessDate and time of last access to the file or directory.
PHP Changing the access date also changes the last modification date (and not the opposite).
AndroidAndroid Widget Java This constant is not available.
fCreationDate and time of file/directory creation.
LinuxiPhone/iPadIOS WidgetMac CatalystPHP The creation date of a file or directory cannot be modified.
AndroidAndroid Widget Java This constant is not available.
fModify
(Default value)
Date and time of last modification made to the file/directory.
PHP The modification date of a directory cannot be modified.

AndroidAndroid Widget Java Only files with a date later than January 1, 1970 can be modified.
Remarks

Equivalence and execution speed

fDateTime is equivalent to fDate and fTime used successively. However, fDateTime is faster.

Handling errors

fDateTime 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,
  • 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.
LinuxiPhone/iPadIOS WidgetMac CatalystPHP The creation date and time of a file or directory cannot be modified.
AndroidAndroid Widget Java Only files with a date later than January 1, 1970 can be modified.
WINDEVWEBDEV - Server codeReports and QueriesJavaUser code (UMC)

Operating mode in Windows Vista (and later)

If this function does not operate properly in Windows Vista (and later), check whether the file or directory used is not in one of the system directories (Windows directory or "Program Files" directory).
In Windows Vista (and later), with the UAC mechanism (User Account Control) enabled, you must have administrator privileges to handle and/or modify the files or directories in system directories (Windows directory or "Program Files" directory).
Programming tip: To handle and/or modify the files or directories without administrator privileges, you should:
  • avoid writing to the Windows directory or to the "Program Files" directory,
  • use the system directory of the application (returned by SysDir with the srAppDataCommun constant, for example).
Component: wd280std.dll
Minimum version required
  • Version 10
This page is also available for…
Comments
Click [Add] to post a comment