Quote (NamelessPrince @ Nov 6 2012 08:21pm)
Doesn't help me as I am using that code and it give me what I don't want...The output is VERY SPECIFIC!
Code
DateFormat formatter = null;
Date convertedDate = null;
try{
String date = "05-10-26";
formatter = new SimpleDateFormat("yy-MM-dd");
convertedDate = (Date) formatter.parse(date);
System.out.println("Date from dd-MM-yyyy String in Java : "
+ convertedDate);
}
catch (ParseException e){
System.err.println(e);}
Gives me
Wed Oct 26 00:00:00 EDT 2005
I want Only what is Above...
did you complete ignore what i told you?
Quote
use two of these
I only see one in your code.
Quote
format writes the string
Instead of calling format(..) you decide to call toString().
And then you complain that i couldn't help you.