Extract date from String java

后端 未结 1 1336
旧时难觅i
旧时难觅i 2021-01-25 03:57

I have a String with several dates, for example:

[20-Jul-2012 5:11:36,670 UTC PM, 20-Jul-2012 5:11:36,683 UTC PM]

How do I read this string and

相关标签:
1条回答
  • 2021-01-25 04:45

    You can try:

     parsePos = new ParsePosition(1);
     while((date = format2.parse(yourString, parsePos)!=null){
          //use date
     }
    
    0 讨论(0)
提交回复
热议问题