am not getting the formatted date using fmt JSTL.My code snippet is as follows
<c:forEach items="${results}" var="files">
<TR>
<TD>
<jsp:useBean id="now" class="java.util.Date" />
Date: <fmt:formatDate value="${now}" dateStyle="both" pattern="MM/dd/yyyy hh:mm a"/>
<fmt:formatDate value="${files.CREATED_ON}" type="both" dateStyle="long" pattern="MM/dd/yyyy hh:mm a" />
</TD>
</TR>
/c:forEach>
and my "files.CREATED_ON" value is 2005-08-03 15:33:11.0.
Its not formatting in given pattern.Its just simply giving the same value
-
need help w/o formatted date using JSTL tag (3 messages)
- Posted by: Mitul Bhammar
- Posted on: August 04 2005 06:16 EDT
Threaded Messages (3)
- need help w/o formatted date using JSTL tag by Rich Hill on August 04 2005 10:49 EDT
- UnParseable Exception while using by Mitul Bhammar on August 05 2005 04:39 EDT
- DateStyle by Joe Wolf on August 04 2005 16:21 EDT
-
need help w/o formatted date using JSTL tag[ Go to top ]
- Posted by: Rich Hill
- Posted on: August 04 2005 10:49 EDT
- in response to Mitul Bhammar
Are you getting any error messages? -
UnParseable Exception while using[ Go to top ]
- Posted by: Mitul Bhammar
- Posted on: August 05 2005 04:39 EDT
- in response to Rich Hill
<c:forEach items="${results}" var="files">
<TR>
<TD>
<jsp:useBean id="now" class="java.util.Date" />
Date: <fmt:formatDate value="${now}" dateStyle="both" pattern="MM/dd/yyyy hh:mm a"/>
<fmt:formatDate value="${files.CREATED_ON}" type="both" dateStyle="long" pattern="MM/dd/yyyy hh:mm a" />
</TD>
</TR>
/c:forEach> -
DateStyle[ Go to top ]
- Posted by: Joe Wolf
- Posted on: August 04 2005 16:21 EDT
- in response to Mitul Bhammar
Try removing the dateStyle="long" attribute, it may be conflicting with the pattern attribute.