Document Created / Modified Date

Many times it is necessary to display when a document was created or when it was last modified. There are a number of ways that this can be done including hard-coding the date into the document upon each revision. To avoid all that repetitive typing you can simply add document.fileCreatedDate or document.fileModifiedDate inside a document.write statement and update the date automatically.

Note: this script DOES NOT work on ASP pages since they are created and last modified at run time!
See for the asp compatible version.
<script language=JavaScript>
 document.write ("Document Created On: ")
 document.write (document.fileCreatedDate)
 document.write ("<p>")
 document.write ("Document Last Modified On: ")
 document.write (document.fileModifiedDate)

javascript modified date last modified created date

Back To Top
© 1998 - 2024
Version 7.21 | Advertise on this site