i am getting date from webservice
example: Wed, 29 june 2011 07:13:33
now i dont want to show full date with time zone just Wed, 29 june 2011 any one guide me how to achieve this?
any help would be appreciated.
i am getting date from webservice
example: Wed, 29 june 2011 07:13:33
now i dont want to show full date with time zone just Wed, 29 june 2011 any one guide me how to achieve this?
any help would be appreciated.
This problem was already solved on StackOverflow here: Java string to date conversion (that is converting date string to java date)
Here is for your example:
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