Hi,
I am importing data from a json and I am finding problem while setting date field.
I am using java util calendar and using set function.
here is the peace of code
'Calendar opCal = Calendar.getInstance() ;
if (OpDate.length() > 0) {
int ddOp = Integer.parseInt(schOpDate.substring(0,2));
int mmOp = Integer.parseInt(schOpDate.substring(3,5));
int yyyyOp = Integer.parseInt(schOpDate.substring(6));
opCal.clear();
opCal.set(yyyyOp,mmOp,ddOp);
}'
'chContent.setProperty("customDate", opCal);'
but in some cases it setting wrong date like for 12-10-2021, its setting 13-11-2021. I dont know why its doing that.
Is there a better way of doing it ?
Thanks