Timestamp类型与日期类型之间的转化? Timestamp timestamp = Timestamp.valueOf("2017-03-17 07:00:00"); Date date = new Date(timestamp.getTime()); SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); System.out.println(format.format(d…
Date日期类 Date表示特定的时间,精确到毫秒; 构造方法: public Data() public Date(long date) 常用方法: public long getTime() public void setTime(long time) public Boolean before(Date when) public Boolean after(Date when) public int compareTo(Date anotherDate) public String toS…