Table of contents

DateCreated 属性DateCreated Property

office 365 dev account|上次更新日期: 2018/3/13
2 参与人员

说明返回日期和时间的指定的文件或文件夹已创建。只读的。语法对象时间对象_始终是一个文件文件夹的对象。备注下面的代码演示使用文件时间属性的用法:Description Returns the date and time that the specified file or folder was created. Read-only. Syntax _object. DateCreated The object is always a File or Folder object. Remarks The following code illustrates the use of the DateCreated property with a file:

Sub ShowFileInfo(filespec)
    Dim fs, f, s
    Set fs = CreateObject("Scripting.FileSystemObject")
    Set f = fs.GetFile(filespec)
    s = "Created: " &; f.DateCreated
    MsgBox s
End Sub
© 2018 Microsoft