You'll need one (Simple)DateFormat to parse input string following input format and obtain a Date instance.
Then another (Simple)DateFormat for formatting this Date given the expected output format.
Looks like your parser pattern will be:"dd/MM/yyyy HH:mm:ss"
and your formatter pattern will be:"yyyy-dd-MM"
thanks TimTheEnchantor, that worked fine.
Here's the code in case someone else needs it:
String date="05/11/2003 15:22:19";
Date convDate;
SimpleDateFormat formatterIn;
SimpleDateFormat formatterOut;
try {
formatterIn = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss");
convDate=formatterIn.parse(date);
formatterOut = new SimpleDateFormat("yyyy-dd-MM");
date=formatterOut.format(convDate);
} catch (Exception e) {
date = "";
}