时间年月日格式化

1 @Test
2     public void test4(){
3         Date date = new Date();
4         SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); 
5         String str = format.format(date);
6     }
原文地址:https://www.cnblogs.com/xjbBill/p/5885058.html