[英]How to convert complex date string into datetime java
I have the following string that I need put into a date time 我需要将以下字符串放入日期时间
Sat, 21-May-2011 21:31:35 GMT 星期六,2011年5月21日21:31:35 GMT
So far I'm doing the following but I'm not sure of the valid format to get this parsed. 到目前为止,我正在做以下事情,但我不确定解析它的有效格式。 Any help would be appreciated! 任何帮助,将不胜感激!
SimpleDateFormat df = new SimpleDateFormat("dd/MM/yyyy");
Date date = df.parse("Sat, 21-May-2011 21:31:35 GMT");
Thank you in advance 先感谢您
有关格式指导,请参阅SimpleDateFormat
文档您应该具有类似的内容
SimpleDateFormat df = new SimpleDateFormat("EEE, dd-MMM-yyyy HH:mm:ss zzz");
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.