Understanding JodaTime DateTime.parse(string, formatter)

前端 未结 2 1825
隐瞒了意图╮
隐瞒了意图╮ 2020-12-31 03:50

Does the style of the formatter in the parse method of the DateTime class have to match the exact style of the string? For instance, I\'m getting a TimeStamp object from the

2条回答
  •  执念已碎
    2020-12-31 04:23

    Figured it out. To get the correct format, you have to call formatter.print(localDateTime object) and it worked.

提交回复
热议问题