Or you can have more control over the format using something like...

<%@ page import="java.text.DateFormat" %>
<%
  Date lastModified = new Date( miliseconds );
  String strLastModified = DateFormat.getDateTimeInstance( DateFormat.SHORT,
DateFormat.SHORT ).format( lastModified );
%>
<html>
<body>
Today's date is: <%=strLastModified%>
</body>
</html>

You can use the various factory methods on DateFormat to create a exactly
the format you want.

----- Original Message -----
From: Chris Janicki <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Saturday, February 03, 2001 1:25 PM
Subject: Re: current date in a web page


Try this:

<html>
<body>
Today's date is: <%=(new java.util.Date()).toString()%>
</body>
</html>


>>>>>>>>>>>>>>>>>> Original Message <<<<<<<<<<<<<<<<<<

On 2/3/01, 11:38:20 AM, [EMAIL PROTECTED] wrote regarding current date in a
web page:


> Can any body help me?
> my problem is that i dont know, using jsp, how to present in a web pahe
the current date. Can anybody send me the code, all page's code, for show
te current date?
> ------------------
> por favor puede alguien enviarme una pagina en jsp, todo el codio, ue me
muestre la fecha actual?
> no tehgo ni idea de como lo puedo hacer.
> muchas gracias
> carlos



> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to