public static Date removeTime(Date date) {
Calendar cal = Calendar.getInstance();
cal.setTime(date);
int year = cal.get(Calneder.YEAR);
cal.set(Calendar.HOUR_OF_DAY, 0);
return cal.getTime();
}
Date与Calender转化设置日期时间Demo
猜你喜欢
转载自www.cnblogs.com/seliote/p/9060743.html
今日推荐
周排行