How parse 2013-03-13T20:59:31+0000 date string to Date

前端 未结 4 1151
死守一世寂寞
死守一世寂寞 2020-12-14 08:37

How to parse this format date string 2013-03-13T20:59:31+0000 to Date object?

I\'m trying on this way but it doesn\'t work.

DateForm         


        
4条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-14 09:19

    For 2017-02-08 06:23:35 +0000 this kind of Date format, i use below format:

    SimpleDateFormat formatDate;
    formatDate= new SimpleDateFormat("yyyy-MM-dd HH:mm:ss ZZZ");
    

    Its working for me. Other answers not working for me.

提交回复
热议问题