I am working on dateFormat in java,I am facing some problem,Please check my code below
String sDate = "2014-05-20";
Date convertDate = new Date(s);
System.out.println(convertDate );
It's working fine but the output is like
OutPut:Tue May 20 13:52:40 IST 2014
but I dont' won't the output like this ,I want out put same as String format
ExpectedOutput :2014-05-20
how can i do this any one help me
No comments:
Post a Comment