Can anyone please help me understand why I am getting different month values for
SimpleDateFormat dateFormat = new SimpleDateFormat(\"dd/MM/yyyy\");
Syst
Your likely problem is that Calendar uses a zero-based index for months. So the format correctly outputs 9 for September, but the getter returns 8.
Is this stupid and inconsistent of Calendar? Yes! Use the Joda-Time API for working with dates and times instead. As far as I'm aware, it's currently the de-facto standard until JSR 310 comes around.