You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@xmlbeans.apache.org by Steven Crosley <st...@mac.com> on 2007/12/02 00:35:31 UTC
Converting an XMLCalendar using JSTL
I'm trying to format a date from my model using JSTL:
<fmt:formatDate value="${test.myDate}" type="date" pattern="dd/MM/
yyyy"/>
When I do this, I get the following error:
java.lang.IllegalArgumentException: Cannot convert 2007-11-29T15:53:22
of type class org.apache.xmlbeans.XmlCalendar to class java.util.Date
Is there a way to convert an XmlCalendar date object using the
standard tag libraries?
Thanks,
Steven
Re: Converting an XMLCalendar using JSTL
Posted by Steven Crosley <st...@mac.com>.
nm, figured out that you have to call parseDate before formatDate.
thanks,
Steven
On Dec 1, 2007, at 5:35 PM, Steven Crosley wrote:
> I'm trying to format a date from my model using JSTL:
>
> <fmt:formatDate value="${test.myDate}" type="date" pattern="dd/MM/
> yyyy"/>
>
> When I do this, I get the following error:
>
> java.lang.IllegalArgumentException: Cannot convert
> 2007-11-29T15:53:22 of type class org.apache.xmlbeans.XmlCalendar to
> class java.util.Date
>
> Is there a way to convert an XmlCalendar date object using the
> standard tag libraries?
>
> Thanks,
> Steven
>
>