FolderItem.ModificationDate
From Xojo Documentation
This item was deprecated in version 2019r2. Please use FolderItem.ModificationDateTime as a replacement. |
or
DateValue = aFolderItem.ModificationDate
Supported for all project types and targets.
The modification date of the FolderItem.
Notes
Do not modify the ModificationDate directly. Instead always assign a new Date 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.
Example
This example displays the modification date in the ShortDate format.
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 simply 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: