要将JodaTime转换
org.joda.time.LocalDate为
java.sql.Timestamp,只需执行
Timestamp timestamp = new Timestamp(localDate.toDateTimeAtStartOfDay().getMillis());
要将JodaTime转换
org.joda.time.LocalDateTime为
java.sql.Timestamp,只需执行
Timestamp timestamp = new Timestamp(localDateTime.toDateTime().getMillis());
Java时间
要将Java8转换
java.time.LocalDate为
java.sql.Timestamp,只需执行
Timestamp timestamp = Timestamp.valueOf(localDate.atStartOfDay());
要将Java8转换
java.time.LocalDateTime为
java.sql.Timestamp,只需执行
Timestamp timestamp = Timestamp.valueOf(localDateTime);
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)