Utilities.FileSetDate Method

Applies to TestComplete 15.10, last modified on December 01, 2021
This method is obsolete. See the Remarks section below.


Use the Utilities.FileSetDate method to set the date and time attributes for the file with the specified Handle. The file handle is returned by the FileCreate or FileOpen function.


Utilities.FileSetDate(Handle, Age)

Handle [in]    Required    Integer    
Age [in]    Required    Integer    
Result Integer

Applies To

The method is applied to the following object:


The method has the following parameters:


Specifies the handle of the file whose date and time attributes you want to set.


Specifies an integer value that holds the date and time to be set. To convert a Variant value to this format, use the DateTimeToFileDate function.

Result Value

If the file’s date and time attributes have been set successfully, the function returns 0. Otherwise, it returns a Windows error code.


This method is obsolete. It is supported for backward compatibility only. To set the date and time attributes, use the aqFile.SetLastWriteTime or aqFileInfo.SetLastWriteTime method.

See Also

Working With Dates
SetLastWriteTime Method
SetLastWriteTime Method
SetLastAccessTime Method
SetLastAccessTime Method
SetCreationTime Method
SetCreationTime Method
Create Method
OpenBinaryFile Method
OpenTextFile Method

Highlight search results