Last Modified Time Stamp   
 
When was this file last modified? Assuming the name of this file is myPage.asp, and you are running IIS4 or higher, this is how you would do it:

<%
' Set your objects here:
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.GetFile(Server.MapPath("myPage.asp"))
dateModified = objFile.DateLastModified
%>

<html>
<body>
Then, show the stuff on your page:
This file was modified on the date and time below:<br>
You can write out the date as is:<br>
<%=dateModified%><br>
or special format it:<br>
<%=FormatDateTime(dateModified,1)%> at <%=FormatDateTime(dateModified,3)%><br>
<%
' don't forget to kill your objects!
Set objFile = Nothing
Set objFSO = Nothing
%>
</body>
</html>

This file was modified on the date and time below:
You can write out the date as is:
1/29/2002 10:02:58 PM
or special format it:
Tuesday, January 29, 2002 at 10:02:58 PM

My3C's
perrychicker
It's easy... it's a PSACAKE!
Back | Tell A Friend | Search this Site
© 1998 - 2010 psacake.com
Version 3.23

Send me One Million FREE Guaranteed Visitors