How to parse dates in multiple formats using SimpleDateFormat

前端 未结 12 1485
伪装坚强ぢ
伪装坚强ぢ 2020-11-22 08:41

I am trying to parse some dates that are coming out of a document. It would appear users have entered these dates in a similar but not exact format.

here are the for

12条回答
  •  伪装坚强ぢ
    2020-11-22 09:08

    In Apache commons lang, DateUtils class we have a method called parseDate. We can use this for parsing the date.

    Also another library Joda-time also have the method to parse the date.

提交回复
热议问题