string date is yyyy-mm-dd java hh:mm:ss format how to convert to dd-mm-yyyy format code example
Example: java date to string yyyy-mm-dd
java.util.Date date = new Date("Sat Dec 01 00:00:00 GMT 2012");
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
String format = formatter.format(date);
System.out.println(format);