N
Nino Skilj
I have been struggling with this for while now and I have determined
that I just don't get it!
I have a date as a string in this format: Mon Jun 30 16:45:06
I want to format it as a date like this: 2003-06-30 (yyyy-MM-dd)
This is what I have tried so far (about the 20th iteration of it at
least):
String DATE_FORMAT = "yyyy-MM-dd";
SimpleDateFormat formatter = new SimpleDateFormat(DATE_FORMAT);
DateFormat df = DateFormat.getDateInstance();
try {
Date xyz = df.parse(fixdates.getString("fulldate"));
} catch (ParseException e) {
out.print("Parse Exception")
}
String formatteddate = formatter.format(xyz);
Any ideas? The code compiles and I always get a:
Parse Exception Error: Unparseable date: "Mon Jun 30 16:45:06"
What am I doing wrong?
Nino Skilj
that I just don't get it!
I have a date as a string in this format: Mon Jun 30 16:45:06
I want to format it as a date like this: 2003-06-30 (yyyy-MM-dd)
This is what I have tried so far (about the 20th iteration of it at
least):
String DATE_FORMAT = "yyyy-MM-dd";
SimpleDateFormat formatter = new SimpleDateFormat(DATE_FORMAT);
DateFormat df = DateFormat.getDateInstance();
try {
Date xyz = df.parse(fixdates.getString("fulldate"));
} catch (ParseException e) {
out.print("Parse Exception")
}
String formatteddate = formatter.format(xyz);
Any ideas? The code compiles and I always get a:
Parse Exception Error: Unparseable date: "Mon Jun 30 16:45:06"
What am I doing wrong?
Nino Skilj