code: public static String formatDateString(String dateString, String format1, String format2) {
          if (dateString == null) {
              return null;
          }
          java.text.SimpleDateFormat beforeFormat = new java.text.SimpleDateFormat(format1);
          java.text.SimpleDateFormat endFormat = new java.text.SimpleDateFormat(format2);
          try {
              return endFormat.format(beforeFormat.parse(dateString));
          } catch (ParseException e) {
              e.printStackTrace();
              return dateString;
          }
      }
docs: @param dateString
  @param format1    ，如yyyyMMdd
  @param format2    , 如yyyy/MM/dd
  
  @return
  
  @author zhangpingan