DateLastAccessed Property |
Description
Returns the date and time that the specified file was last accessed. Read-only.
PowerBASIC Syntax
Return Value
DOUBLE. The date and time that the file was last accessed.
Example [PowerBASIC]
#INCLUDE "windows.inc" #INCLUDE "scrrun.inc"
DIM fso AS IFileSystem DIM pFile AS IFile DIM dDateLastAccessed AS DOUBLE
' Create an instance of the FileSystemObject fso = NEWCOM "Scripting.FileSystemObject" ' Get a reference to the IFile interface pFile = fso.GetFile(UCODE$("C:\MyFolder\MyFile.txt")) ' Get the date in which the file was last accessed dDateLastAccessed = pFile.DateLastAccessed ' Convert the date to a formated string DIM d AS ASCIIZ * 64 DIM st AS SYSTEMTIME VariantTimeToSystemTime dDateLastAccessed, st GetDateFormat %LOCALE_USER_DEFAULT, %DATE_SHORTDATE, st, BYVAL %NULL, d, 64 d, 64 MSGBOX "Date: " & d
|