What is the wrong with this format , commented format is throwing exception ,
Please help me with this dd and DD in java for date format.
SimpleDateFormat dformat = new SimpleDateFormat("yyyyddmm");
// SimpleDateFormat dformat = new SimpleDateFormat("yyyyDDMM");
dformat.setLenient(false);
dformat.parse("20121010");
Exception :
Error: Unparseable date: “20121010”
D(Capital) is used to indicateDAY IN YEARlike123,300,etc.While
d(small-lowercase) is used to indicateDAY OF MONTHlike12,25, Here values like36will not be valid.Javadoc explains all the letters that you can use in SimpleDateFormat