java.text.ParseException: unparsable date: quot;Mon, 22 Aug 2005 20:21:52 +0200quot;(异常:无法解析的日期:Quot;Mon,2005年8月20:21:52+0200Quot;)
问题描述
我收到此错误。
我的代码有什么问题?
String line = "Date: Mon, 22 Aug 2005 20:21:52 +0200";
String datestring = line.substring(6);
DateFormat dateFormat = new SimpleDateFormat("E, dd MMM yyyy HH:mm:ss ZZZZZ");
Date inputDate = null;
try {
inputDate = dateFormat.parse(datestring);
} catch (ParseException e) {
e.printStackTrace();
}
我的错误日志:
这篇关于异常:无法解析的日期:&Quot;Mon,2005年8月20:21:52+0200&Quot;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!