格式化时间取整分
Date date=new Date();
SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String date_time=sdf.format(date);
String mm=date_time.split(" ")[1].split(":")[1];
String dates=date_time.split(" ")[0]+" "+date_time.split(" ")[1].split(":")[0]+":"+date_time.split(" ")[1].split(":")[1].substring(0, 1)+"0"+":00";
System.out.println(dates);
2016-11-07 16:40:00