View Full Version : Displaying file dates on web pages
krwhite
02-12-2001, 06:07 PM
I would like to be able to do is display the last modified date for files on my ftp site on my download page. Instead of manually updating the currency date, what I want is to have something like; "This file is current as of (file date)."
I am not a Java programmer, but what I'm looking for something similar the "FileDateTime" Function in VB.
Thanks
Kevin
Dr. Web
02-12-2001, 07:36 PM
you can achieve this by using javascript (try posting in client side scripting). Though I do know that when you check the mod date, it is the date and time on the SERVER your pages are located on. So if you are using a server which has the incorrect date.........
SteveS235
02-12-2001, 08:54 PM
Try putting this inside the BODY tags:
<SCRIPT LANGUAGE="JavaScript">
<!-- Original: Kenneth Preston <drkennan@ionet.net> -->
<!-- Begin
var m = "Page updated " + document.lastModified;
var p = m.length-8;
document.writeln("<center>");
document.write(m.substring(p, 0));
document.writeln("</center>");
// End -->
</SCRIPT>
You can change "Page updated" to whatever you want it to say before it displays the date.
vBulletin® v3.6.7, Copyright ©2000-2009, Jelsoft Enterprises Ltd.