I have a
String dateString = "Fri Feb 14 00:00:00 IST 2014";
I need output in Date datatype like 2014-02-14
.
Here is the code which is throwing Parse exception
.
Need help in this.
public static void main(String args[]){
DateFormat df = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
String dateString = "Fri Feb 14 00:00:00 IST 2014";
Date convertedDate = null;
try {
convertedDate = df.parse(dateString);
} catch (ParseException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
System.out.println(convertedDate);
}