Java获得今日零时零分零秒的时间(Date型)

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)); }

评论

暂无评论