I have a string type date. I want to change it firstly into date datatype. But it is not formating date properly as I want.Here is my code
String a="12/11/2010";
Date d=new Date();
SimpleDateFormat as=new SimpleDateFormat("dd/MM/yy");
d=as.parse(a);
System.out.println(a);
Output is like this :Sun Jan 01 00:00:00 IST 2012
But I want output like this 12-10-2014
in Date data type, not in String data type.