我收到来自web服务日期
i am getting date from webservice
例如:星期三,2011年6月29日7时13分33秒。
example: Wed, 29 june 2011 07:13:33
现在我不希望显示完整的日期与时间带刚的周三,2011年6月29日任何一个指导我如何实现这一目标?
now i dont want to show full date with time zone just Wed, 29 june 2011 any one guide me how to achieve this?
任何帮助将是AP preciated。
any help would be appreciated.
这个问题已经解决了在计算器上的位置:的 Java字符串到日期转换(即日期字符串转换为Java的日期)
This problem was already solved on StackOverflow here: Java string to date conversion (that is converting date string to java date)
下面是您例如:
String inDate="Wed, 29 june 2011 07:13:33";
Date date;
try {
date = new SimpleDateFormat("E, dd MMM yyyy HH:mm:ss", Locale.ENGLISH).parse(inDate);
System.out.println(date); //Wed Jun 29 07:13:33 CEST 2011
} catch (ParseException e) {
e.printStackTrace();
}
打印过时本身应该是至少你的问题
Printing out date itself should be the least of your problems