SimpleDateFormat format1 = new SimpleDateFormat("yyyyMMdd");
try{
System.out.println(format1.format(format1.parse("20090801")));
}catch(Exception e){
}
上面运行结果是20090801
SimpleDateFormat format1 = new SimpleDateFormat("yyyyMMdd");
try{
System.out.println(format1.format(format1.parse("2009-08-01")));
}catch(Exception e){
}
上面运行两次以上的结果是20081208