时间:2021-07-01 10:21:17 帮助过:8人阅读
public static void main(String[] args) {
java.sql.Date createTime = new java.sql.Date(System.currentTimeMillis()-5400000);
System.out.println("sql date: "+createTime);
Date create_time = new Date(System.currentTimeMillis()-5400000);
System.out.println("util date: "+ create_time);
System.out.println("格式化: "+DateUtils.date2Str(create_time,DateUtils.datetimeFormat));
}
sql date: 2019-11-06
util date: Wed Nov 06 08:38:37 CST 2019
格式化: 2019-11-06 08:38:37
java.sql.Date与java.sql.Date区别
标签:sql 结果 int new color orm main for 格式化