My input is in the format of Sep 22, 2008
and how to convert it into 9/22/2008
using JAVA?
Asked
Active
Viewed 843 times
-7

Buddha
- 4,339
- 2
- 27
- 51

krnitish1803
- 9
- 3
-
2http://www.tutorialspoint.com/java/java_date_time.htm, using google does not hurt you – user902383 Dec 10 '13 at 10:26
1 Answers
2
Do like this
Date date = new SimpleDateFormat("MMM d, yyyy").parse("Sep 22, 2008");
String formattedDate = new SimpleDateFormat("MM/dd/yyyy").format(date);
System.out.println(formattedDate);
output
09/22/2008

Prabhakaran Ramaswamy
- 25,706
- 10
- 57
- 64