java.text.ParseException: Unparseable date: “2014-06-04” (at offset 5)

后端 未结 4 1863
名媛妹妹
名媛妹妹 2021-01-04 19:14

I want to parse the date into a desired format but i am receiving an exception every time. i know it is easy to implement but i am facing some problem don\'t know where exac

4条回答
  •  时光取名叫无心
    2021-01-04 19:33

    You have no time part in your string: and the Month has only two character replace

    new SimpleDateFormat("yyyy-MMM-dd HH:mm:ss",Locale.ENGLISH);
    

    with

    new SimpleDateFormat("yyyy-MM-dd",Locale.ENGLISH);
    

提交回复
热议问题