特牛生活网

字符串和LocalDateTime互转、计算时间差_字符串转localdatetime-CSDN博客

网友收藏
文章浏览阅读2.9k次。public static void main(String[] args) { // 字符串转LocalDateTime DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); LocalDateTime time = LocalDateTime.now(); LocalDateTime endTime = LocalDateTime.pa..._字符串转localdatetime