201404转成 2014.04

    public static void main(String[] args) throws ParseException{
    	   //先转成日期
    	  String fmt = "yyyyMM";
          SimpleDateFormat sdf = new SimpleDateFormat(fmt);
          Date date = sdf.parse("201404");
          
          //再转样式
          fmt = "yyyy.MM";
          sdf = new SimpleDateFormat(fmt);
          String str = sdf.format(date);
          
          System.out.println("str=" + str);
    }
原文地址:https://www.cnblogs.com/zhaoding/p/6251556.html