Fayaz,
SimpleDateFormat formatter =newSimpleDateFormat("dd/MM/yyyy");
String dateInString ="7/12/2013";
try{
Date date = formatter.parse(dateInString);
System.out.println(date);
System.out.println(formatter.format(date));
}catch(ParseException e){
e.printStackTrace();
}
or
String startDateString = "20/06/2013";
DateFormat df = new SimpleDateFormat("dd/MM/yyyy");
Date startDate;
try {
startDate = df.parse(startDateString);
String newDateString = df.format(startDate);
System.out.println(newDateString);
}
catch (ParseException e)
{
e.printStackTrace();
}
Please try above code. Hope this is helpful !!!
Regards
Vijay K