PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US

  • Equivalence and execution speed
  • Managing the errors
  • Operating mode in the different operating systems
  • Operating mode in Windows Vista (and later)
  • Date and time of creation, modification or access
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Returns or modifies the different dates and times associated with a file or directory (creation, modification or access).
Versions 15 and later
Android This function is now available for the Android applications.
New in version 15
Android This function is now available for the Android applications.
Android This function is now available for the Android applications.
Versions 17 and later
iPhone/iPad This function is now available for the iPhone/iPad applications.
New in version 17
iPhone/iPad This function is now available for the iPhone/iPad applications.
iPhone/iPad This function is now available for the iPhone/iPad applications.
Versions 18 and later
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
New in version 18
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Versions 21 and later
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 21
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
WINDEVWEBDEV - Server codeReports and QueriesJavaPHPAjaxUser code (UMC)
// Find out the date and time of file modification
ResDate = fDateTime("C:\MyDirectories\File.txt", "", fModify)
Windows Mobile
// Find out the date and time of file creation
ResDate = fDateTime("\MyDirectories\File.txt", "", fCreation)
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.
Windows Mobile This path must be a full path or a UNC path. It cannot be a relative path.
Versions 15 and later
AndroidAndroid Widget This parameter can correspond to a full path or to a relative path in relation 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 sub-directories, as well as onto the external memory (SDCard).
New in version 15
AndroidAndroid Widget This parameter can correspond to a full path or to a relative path in relation 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 sub-directories, as well as onto the external memory (SDCard).
AndroidAndroid Widget This parameter can correspond to a full path or to a relative path in relation 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 sub-directories, as well as onto the external memory (SDCard).
Versions 17 and later
iPhone/iPad This parameter can correspond to a full path or to a relative path in relation 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 sub-directories.
New in version 17
iPhone/iPad This parameter can correspond to a full path or to a relative path in relation 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 sub-directories.
iPhone/iPad This parameter can correspond to a full path or to a relative path in relation 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 sub-directories.
<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:
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/iPadPHP 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 the files whose date is after 1st of January 1970 can be modified.
Remarks

Equivalence and execution speed

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

Managing the errors

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.
LinuxiPhone/iPadPHP The creation date and time of a file or directory cannot be modified.
AndroidAndroid Widget Java Only the files whose date is after 1st of January 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 used is not found in one of the system directories (Windows directory or "Program Files" directory).
Indeed, in Windows Vista (and later), with the UAC mechanism (User Account Control) enabled, you must have the administrator privileges to handle and/or modify the files found in the system directories (Windows directory or "Program Files" directory).
Programming tip: To handle and/or modify the files without having administrator privileges, you should:
  • avoid writing into the Windows directory or into the "Program Files" directory,
  • use the system directory corresponding to the application (returned by SysDir associated with the srCommonAppData constant).
Windows Mobile

Date and time of creation, modification or access

In most cases, the date and time of file creation, file modification and file access are identical.
Components
WINDEVWEBDEV - Server codeReports and Queries wd230std.dll
Windows Mobile wp230std.dll
Java wd230java.jar
Linux wd230std.so
Android wd230android.jar
Minimum required version
  • Version 10
This page is also available for…
Comments
Click [Add] to post a comment