Date转Timestamp 一句搞定: Timestamp createTime = new Timestamp(new Date().getTime()); Timestamp转Date Timestamp t = new Timestamp(System.currentTimeMillis()); Date d = new Date(t.getTime());