最新的Web开发教程
 

ASP DateCreated Property


<完整文件夹对象参考

该dateCreated会属性用于创建一个指定的文件或文件夹时,返回的日期和时间。

句法

FileObject.DateCreated

FolderObject.DateCreated

例如,对于文件对象

<%
dim fs,f
set fs=Server.CreateObject("Scripting.FileSystemObject")
set f=fs.GetFile("c:\test.txt")
Response.Write("File created: ")
Response.Write(f.DateCreated)
set f=nothing
set fs=nothing
%>

Output:

File created: 9/19/2001 10:01:19 AM

例如,对于文件夹对象

<%
dim fs,fo
set fs=Server.CreateObject("Scripting.FileSystemObject")
set fo=fs.GetFolder("c:\test")
Response.Write("Folder created: ")
Response.Write(fo.DateCreated)
set fo=nothing
set fs=nothing
%>

Output:

Folder created: 9/19/2001 10:01:19 AM

<完整文件夹对象参考