I am trying to convert date which is in string and got format of \"yyyy-MM-dd HH:mm:ss\" to \"dd-MM-yyyy\".
I have implmented following code but its giving : java.
try this way
String mydate = "2011-11-29 12:34:25"
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
Date date = null;
try{
date = sdf.parse(mydate);
SimpleDateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy");
String mydate = dateFormat.format(date);
}catch(Exception ex){
// handle exception
}