SimpleDateFormat sdfx = new SimpleDateFormat("yyyy/MM/dd");
SimpleDateFormat sdfh = new SimpleDateFormat("yyyy-MM-dd");
String nowTime2 = "";
try{
nowTime2 = sdfh.format(sdfx.parse("2010/12/12"));
}catch(Exception e){
e.printStackTrace();
}
SimpleDateFormat sdfh = new SimpleDateFormat("yyyy-MM-dd");
String nowTime2 = "";
try{
nowTime2 = sdfh.format(sdfx.parse("2010/12/12"));
}catch(Exception e){
e.printStackTrace();
}
System.out.println(nowTime2);
欢迎加入我们的交流群425783133
转载自http://blog.sina.com.cn/s/blog_7047c3ce0100odae.html