public Date zeroTime() throws ParseException { Date time = new Date(); SimpleDateFormat simp= new SimpleDateFormat("yyyy-MM-dd 00:00:00"); SimpleDateFormat simp2= new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); return simp2.parse(simp.format(time)); }
public Date zeroTime() throws ParseException { Date time = new Date(); SimpleDateFormat simp= new SimpleDateFormat("yyyy-MM-dd 00:00:00"); SimpleDateFormat simp2= new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); return simp2.parse(simp.format(time)); }
转载于:https://my.oschina.net/chaofan2685/blog/793484