[jboss-user] [EJB 3.0] - Re: Problem retrieving dates from database

chawax do-not-reply at jboss.com
Mon Nov 19 04:21:48 EST 2007


Thanks, it works.

Anyway I thought this was what caused my formatting problems, but I still have them ...

For example, I have a java.util.Date variable which contains "Thu Nov 15 00:00:00 CET 2007" value.

If I format it with SimpleDateFormat :

SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
  | System.out.println(sdf.format(membreUniteOrganisation.getDateDebut()));

It prints "15/11/2007" which is right.

But if I format it with <f:convertDateTime> with datePattern as "dd/MM/yyyy" :

<h:outputText value="#{membre.dateDebut}">
  |     <f:convertDateTime pattern="#{messages['datePattern']}" />
  | </h:outputText>

It prints "14 nov. 2007" which is wrong of course !

Any idea why ?

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4105927#4105927

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4105927



More information about the jboss-user mailing list