JSTL - Format date

Posted by John Manak on Stack Overflow See other posts from Stack Overflow or by John Manak
Published on 2010-04-12T08:24:24Z Indexed on 2010/04/12 8:33 UTC
Read the original article Hit count: 343

Filed under:
|
|

Hi! I have a loop that goes through all the news items we have on our site. One of the fields is date ${newsitem.value['Date']}, given in millliseconds. I'd like to display this date in month/day/year format on the webpage. I thought JSTL format tag, <fmt:formatDate>, would help, but I haven't succeeded. Do you know how to do it?

<cms:contentaccess var="newsitem" />
<h2><c:out value="${newsitem.value['Title']}" /></h2>
// display date here        
<c:out value="${newsitem.value['Text']}"  escapeXml="false" />

© Stack Overflow or respective owner

Related posts about jstl

Related posts about datetime