java.text.ParseException: Unparseable date: convert mm/dd/yyyy string to a date

前端 未结 4 1986
南方客
南方客 2021-01-03 04:18

when i convert my string object in mm/dd/yyyy format to Date it gives me

java.text.ParseException: Unparseable date: \"09/17/2014         


        
4条回答
  •  没有蜡笔的小新
    2021-01-03 05:02

    I have the following exception:

    java.text.ParseException: Unparseable date

    System.out.println("inside the XMLGregorianCalendar");
    
    sb = (String) map.get(fieldname);
    System.out.println("THis is XMLGReogoriaaaaan calendar"+ sb);
    DateFormat df = new SimpleDateFormat("yyyy-MM-dd", Locale.US);
    Date journeyDate = new java.sql.Date(df.parse(sb).getTime());
    System.out.println("this"+journeyDate);
    

提交回复
热议问题