Summary:- This function is very useful for getting the date that the document was last modified.
ASP Code:-
<%
Function LastUpdated
Dim fso, thispage, fileObject, datemodified
Set fs = CreateObject("Scripting.FileSystemObject")
thispage = replace(request.ServerVariables("URL"), "/", "\")
Set fileObject = fs.GetFile(server.MapPath(thispage))
datemodified = fileObject.DateLastModified
LastUpdated = (FormatDateTime(datemodified, 1))
Set fileObject = Nothing
Set fs = Nothing
End function
%>
<% Response.write ("Last Updated: " & lastUpdated)
'--- returns: Last Updated: Wednesday 30 May 2007%>
Wednesday, May 30, 2007
How to retrive the last updateed date of a page.
Posted by Ashutosh Dixit at 4:10 AM
Subscribe to:
Post Comments (Atom)

0 Comments:
Post a Comment