java SimpleDateFormat

后端 未结 4 1550
甜味超标
甜味超标 2020-12-15 23:51

in Java, how to parse a date string that contains a letter that does not represent a pattern?

\"2007-11-02T14:46:03+01:00\"
String date =\"2007-11-0         


        
4条回答
  •  旧时难觅i
    2020-12-16 00:19

    You can try

    String format = "yyyy-MM-dd'T'HH:mm:ssz";
    

    Reference : from Javadoc

    Text can be quoted using single quotes (') to avoid interpretation.

提交回复
热议问题