I'm trying to use file.lastModified() to get the last mod date of a file
and then print on the screen as a string. The problem is it looks
like lastModified() returns a long? Do I have to covert my long to a
string and then use SimpleDateFormater to format it how I want or
is there a way to go right from my long to the date format I want?
Here's what I would like to do:...
<%
String logFileDate = null;
File logFile = new
File("/app/webdocroot/insidectm/logs/coxdirect/2000/cdcor2000repo
rt.htm" );
if( logFile.exists() )
{
DateFormat df = new SimpleDateFormat( "dd-MM-yyyy" );
logFileDate = df.format(logFile.lastModified());
}
%>
any help greatly appreciated.
Rick
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets