System.out.println("Hello World!");
SimpleDateFormat format = new SimpleDateFormat( "yyyy-MM-dd HH:mm:ss");//设置时间格式
Date currentTime = new Date();//获取当前时间  
String date=format.format(currentTime);//对当前时间进行格式化
currentTime=format.parse(date);//自定义格式的时间

 

 posted on 2016-12-14 08:55  布诺  阅读(1759)  评论(0编辑  收藏  举报