【发布时间】:2020-03-18 14:59:04
【问题描述】:
我正在尝试使用此代码将字符串转换为LocalDate:
String end = sharedPref.getString("endDate", "Not available");
DateTimeFormatter formatter = new DateTimeFormatter("yyyy-MM-dd");
LocalDate endDate = LocalDate.parse(end, formatter);
但它显示了标题中提到的错误。我如何解决它? 如果有更好的方法我愿意接受建议
【问题讨论】:
标签: java android time localtime