How can I parse this date format Mon May 14 2010 00:00:00 GMT+0100 (Afr. centrale Ouest) to this date format 05-14-2010 I mean mm-dd-yyyy
it's telling me this error :
java.text.ParseException: Unparseable date: "Mon May 14 2010 00:00:00 GMT+0100 (Afr. centrale Ouest)"
EDIT
SimpleDateFormat formatter = new SimpleDateFormat("M-d-yyyy");
newFirstDate = formatter.parse(""+vo.getFirstDate()); //here the error
Thanks in advance!
vo.getFirstDate()?Mon May 14 2010 00:00:00 GMT+0100 (Afr. centrale Ouest)java.util.Datethere's no need toparse()and all you need isnew SimpleDateFormat("MM-dd-yyyy").format(vo.getFirstDate()).""+...is very suspicious, though. Why would he add that if he already had aString?