I have to convert the date Sun Oct 25 18:41:35 IST 2015
into Oct 25 2015
in java.
Any one can you please suggest?
Asked
Active
Viewed 43 times
-4
-
another 'homework for me' question... – morels Oct 30 '15 at 09:55
-
1Possible duplicate of [Java string to date conversion](http://stackoverflow.com/questions/4216745/java-string-to-date-conversion) – Peter Uhnak Oct 30 '15 at 10:07
1 Answers
-1
Use this
java.util.Date date = new Date("Sun Oct 25 18:41:35 IST 2015");
SimpleDateFormat formatter = new SimpleDateFormat("MMM dd yyyy");
String format = formatter.format(date);
System.out.println(format);

Mostafa Darwish
- 91
- 4