I'm trying to do a conversion from String to Calendar but to no avail.
My String is in dd / MM / yyyy format.
I need to convert to yyyy-MM-dd
And set in a Calendar type object.
void setDATAFUNDACAO(java.util.Calendar value);
Here is my current code
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
Date date = sdf.parse("07/04/2016");
Calendar cal = sdf.getCalendar();
But unfortunately it throws this exception
Exception in thread "main" java.text.ParseException: Unparseable date: "07/04/2016" at java.text.DateFormat.parse (DateFormat.java:337) at test.main (test.java:54)