我正在尝试转换字符串,OffsetDateTime但低于错误.
java.time.format.DateTimeParseException: Text '20150101' could not be parsed: Unable to obtain OffsetDateTime from TemporalAccessor: {},ISO resolved to 2015-01-01 of type java.time.format.Parsed
代码: OffsetDateTime.parse("20150101", DateTimeFormatter.ofPattern("yyyyMMdd"));
预期产量: OffsetDateTime object with date 20150101.
我非常感谢您提供的任何帮助.
谢谢,