I am trying to validate a date which is actually a string, trying to print it in yyyy/MM/dd format.
Here is the code.
String s="2012/12/0390990";
SimpleDateFormat ft = new SimpleDateFormat("yyyy/MM/dd");
System.out.println(ft.format(ft.parse(s))); 
and the output is 3083/05/30. I want to have the validations too. No clue how to proceed.
 
     
     
     
    