有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!


共 (3) 个答案

  1. # 1 楼答案

    DateFormat df = new SimpleDateFormat("dd-MMM-yyyy", Locale.ENGLISH);
    Date date = df.parse("20-Feb-2006");
    
  2. # 2 楼答案

    使用

        String strDate = "20-Feb-2006";
        SimpleDateFormat formatter = new SimpleDateFormat("dd-MMM-yyyy");
        Date dateStr = formatter.parse(strDate);
    
  3. # 3 楼答案

    按以下方式使用DateFormat:

    DateFormat df = new SimpleDateFormat("dd-MMM-yyyy");
    System.out.println( df.parse("20-Feb-2006"));