Date类型转换成LocalDateTime 类型
Date to LocalDateTime:
Date currDate = new Date();
LocalDateTime ldt = currDate.toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime();
System.out.println(ldt);
输出:
2020-01-19T15:41:02.048
Date to LocalDateTime:
Date currDate = new Date();
LocalDateTime ldt = currDate.toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime();
System.out.println(ldt);
输出:
2020-01-19T15:41:02.048