java.time.format.DateTimeParseException: Text '2020-04-03 14:57:41' could not be parsed at index 10
日期: 2020-04-03 分类: 跨站数据 404次阅读
很明显,时间转换错误
代码报错行:
LocalDateTime.parse("2020-04-03 14:57:41");
解决方案:
DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); LocalDateTime parse = LocalDateTime.parse("2020-04-03 14:57:41",df);
除特别声明,本站所有文章均为原创,如需转载请以超级链接形式注明出处:SmartCat's Blog
精华推荐