1 SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd"); 2 SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy-MM-dd"); 3 startDate = sdf2.format (sdf.parse (startDate));; 4 endDate = sdf2.format (sdf.parse (endDate));; 5 result.put("startDate", startDate); 6 result.put("endDate", endDate);
原文:http://www.cnblogs.com/qingruihappy/p/7820320.html