type conversion - Converting String to Date in java -


i programming in java , , little problem since yesterday in parsing date (converting string date)

here exception : java.text.parseexception: unparseable date: "fri may 24 18:47:31 gmt+01:00 2013"

string db= obj.getdebut(); // = "fri may 24 18:47:31 gmt+01:00 2013" string pattern2 = "eee mmm d hh:mm:ss zzzz yyyy"; date datedebutentree = new simpledateformat(pattern2).parse(db);     

thank help

your application language appears french. if default locale likewise, throw parseexception when attempting parse english day , month fields. use locale.english instead:

string pattern2 = "eee mmm d hh:mm:ss z yyyy"; date datedebutentree = new simpledateformat(pattern2, locale.english).parse(db); 

Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -