myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Frédérick, Fabian"<>
Subject [OT] Date conversion problem
Date Thu, 11 Aug 2005 07:21:50 GMT
Hi :)

    I'm trying to convert inpuDate passed in String to my bean with the 
following  (in order to extract year ... for database).

(ddepart is inputdate string).

Date dimport = new Date();
DateFormat df = new SimpleDateFormat ("EEE MMM d hh:mm:ss z yyyy");
      dimport = (Date)df.parse(ddepart);
}catch (Exception e){
System.out.println("!!!"+e) ;      

It doesn't seem to work....Is there an error in simpledateformat ?

Best regards,

View raw message