Parse Date String to Some Java Object

前端 未结 6 2196
太阳男子
太阳男子 2020-11-28 15:41

I am working in a project that reads files and processes data. There I got to work with dates for example:

  1. 2012-01-10 23:13:26
  2. January 13, 2012
  3. <
6条回答
  •  执念已碎
    2020-11-28 16:20

    Easiest would be setting up SimpleDateFormat properly as per the format you would expect and use its parse method to give you a Date object

提交回复
热议问题