Property
FolderItem.ModificationDate
Warning
This item was deprecated in version 2019r2. Please use FolderItem.ModificationDateTime as a replacement.
Description
The modification date of the FolderItem.
Notes
Do not modify the ModificationDate directly. Instead always assign a new DateTime instance to it. Refer to the example below.
On Windows, the ModificationDate cannot be changed if the file is open. This includes if it is open using a BinaryStream, TextInputStream or TextOutputStream. Close the file before changing the ModificationDate.
Sample code
This example displays the modification date in the ShortDate format.
Dim f As New FolderItem
f = GetOpenFolderItem("")
If f <> Nil Then
MsgBox(f.ModificationDate.ShortDate)
End If
Changing ModificationDate is slightly more complex. You cannot just change the ModificationDate property directly because you will be changing a date that is not persistent. Instead you need to create a new date instance with the date you want and then assign that to ModificationDate. Here is an example that "touches" a file by settings its modification date to the current date and time:
Dim f As New FolderItem
f = GetOpenFolderItem("")
If f <> Nil Then
Dim newDate As New Date
f.ModificationDate = newDate
End If
Compatibility
All project types on all supported operating systems.