📜  java代码示例中无法解析的日期错误

📅  最后修改于: 2022-03-11 14:52:47.208000             🧑  作者: Mango

代码示例1
String v_date_str="Sun Mar 06 11:28:16 IST 2011";
        DateFormat formatter;
        formatter = new SimpleDateFormat("dd-MMM-yyyy");
        Date date_temp=null;
        try {
            date_temp = (Date) formatter.parse(v_date_str);
        } catch (ParseException ex) {
            Logger.getLogger(Attendance_Calculation.class.getName()).log(Level.SEVERE, null, ex);
        }
        System.out.println("output: "+date_temp);