Mega Code Archive

 
Categories / Java Tutorial / JSTL
 

Format Both Date and Time in Full Style

<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %><%@ taglib uri="http://java.sun.com/jstl/core-rt" prefix="c-rt" %><%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt" %> <html>   <head>     <title>Format Date</title>   </head>   <body>     <c-rt:set var="now" value="<%=new java.util.Date()%>" />     <fmt:formatDate type="both" dateStyle="full" timeStyle="full" value="${now}" />   </body> </html>