Unparseable date: “30-Jun-12”

后端 未结 3 615
萌比男神i
萌比男神i 2021-01-22 11:44

I\'m using a Java method to convert the date into suitable format:

private Timestamp toTimeStamp(String s) throws java.text.ParseException
    {
        Timestam         


        
3条回答
  •  猫巷女王i
    2021-01-22 11:54

    You are passing date in format 30-Jun-12 then you should use format

    dd-MMM-yy
    

    with SimpleDateFormat

提交回复
热议问题