我遇到了一个要求,我需要将传入的有效负载字符串解析6-12-2019 2:13:30
为 DateTime 格式DD/MM/YYYY 24HH:MM:SS
我尝试了几种方法,但这里似乎没有任何效果。
"6-12-2019 2:13:30" as DateTime {format : "d-M-yyyy h:m:ss"}
这会导致错误说明...
"Cannot coerce String (6-12-2019 2:13:30) to DateTime, caused by: Text '6-12-2019 2:13:30' could not be parsed: Unable to obtain ZonedDateTime from TemporaAccessor: {SecondOfMinute=30, MicroOfSecond=0, MilliOfSecond=0, HourOfAmPm=2, MinuteOfHour=13, NanoOfSecond=0},ISO resolved to 2019-12-06 of type java.time.format.Parsed
有人可以帮我吗?
谢谢。