I am using this code to parse a Date.
SimpleDateFormat formatter = new SimpleDateFormat("MM/dd/yyyy");
SimpleDateFormat formatterParse = new SimpleDateFormat("yyyy-MM-dd");
String s = formatter.format(formatterParse.parse(m.get("lastModifiedDate")));
m is a HashMap and someModifiedDate is coming as 2010-11-26
EDIT: I get InvalidTypeEception. java. Genereated value (java.sql.Date) incompatible with java.lang.String
The snippet below works fine.
The output is
11/26/2010, thus either