Use JSTL's formatDate tag. Very easy to use and lets you format your
date any way you want it. Example:

<fmt:formatDate value="${yourDate}" pattern="yyyy-MM-dd HH:mm" />

it is that simple.
Alex.

> -----Original Message-----
> From: Riaan Oberholzer [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, August 06, 2003 8:30 AM
> To: [EMAIL PROTECTED]
> Subject: [Q] Struts and date formatters
> 
> I am using the <bean:write> tag and for date fields
> (java.util.Date), I get the (rather ugly) full:
> 
> Wed Aug 06 12:08:07 CEST 2003
> 
> I have tried to do:
> 
> DateFormdat df = DateFormat.getDateTimeInstance();
> SimpleDateFormat sdf = (SimpleDateFormat)df;
> sdf.applyPattern("yyyy-MM-dd hh:mm");
> 
> But it gets ignored.... how/where can I change the
> default pattern that struts uses to format dates with?
> 
> Thanks.
> 
> __________________________________
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site design software
> http://sitebuilder.yahoo.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]



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

Reply via email to