Actually I wanted to convert one String to date and then I need to format it in to one another format..
The String I have is
String val="Wed Jan 08 08:49:13 GMT+05:30 2014";
To convert it to
2014-01-30 10:14:18 , this format
Is it possible to do this I tried some method like
SimpleDateFormat df = new SimpleDateFormat("dd-MMM-yyyy");
String formattedDate = df.format(c.getTime());
Calendar cal = Calendar.getInstance(TimeZone.getTimeZone("GMT+1:00"));
// Date currentLocalTime = ;
DateFormat date = new SimpleDateFormat("HH:mm:ss:mmss a");
But nothing worked
Datebefore you can format it differently.