devxlogo

Dynamically Display the Last Modified Date

Dynamically Display the Last Modified Date

A lot of Web pages have a last modified date at the bottom of the page. Although this is a feature easily managed by changing the HTML, a better approach would to generate the last modified date dynamically through ASP.

The key is to extract this information from your file system. First, use the “PATH_TRANSLATED” Request variable to retrieve the physical path of the file on your server. Then, using the FileSystemObject, you can get the last modified date from the file system. Finally, convert the general date time format to the format of your choice.

 

devx-admin

Share the Post: