
August 27th, 2005, 12:29 PM
|
 |
Newton's Apple Wizard
|
|
Join Date: Nov 2003
Location: Los Angeles
|
|
|
Date Last Modified - ASP
asp Code:
Original
- asp Code |
|
|
|
<% Function FileLastMod() ' Local variables Dim loFs, lsFile, lsPath, loFile, ldLast ' Create an instance of FileSystemObject object Set loFs = CreateObject("Scripting.FileSystemObject") ' Get the logical path of the current file ' (i.e. the file in which this code runs) lsFile = Request.ServerVariables("SCRIPT_NAME") ' Get the physical path of the file lsPath = Server.MapPath(lsFile) ' Get a handle/pointer to this file Set loFile = loFs.GetFile(lsPath) ' Get the "Last Modified" property of this file ldLast = loFile.DateLastModified ' Release the objects Set loFile = Nothing Set loFs = Nothing ' Write out the date in the long date ' format e.g. "MM/DD/YY" FileLastMod = CStr(FormatDateTime(ldLast, 2)) End Function %> <%="Last Modified: " & FileLastMod() %>
__________________
If you found a post of mine helpful, please click on the on my post to add to my reputation.
Last edited by shamrog12 : October 25th, 2005 at 04:32 PM.
Reason: error pointed out to me in post
|