//格式化日期
public class test1{
public static void main(String[] args) {
SimpleDateFormat old = new SimpleDateFormat("yyyy/MM/dd");
Date date1 = new Date();
System.out.println(old.format(date1));
}
}
输出结果
2016/01/02
//格式化日期
public class test1{
public static void main(String[] args) {
SimpleDateFormat old = new SimpleDateFormat("yyyy/MM/dd");
Date date1 = new Date();
System.out.println(old.format(date1));
}
}
输出结果
2016/01/02