I'm doing the conversion of the month, the format (LONG) to an integer. But the months are converted without the 0. I must add the 0 of the months lower 10. How can I do?
String month = monthSelector.getSelectedItem().toString();
Calendar cal = Calendar.getInstance();
try {
cal.setTime(new SimpleDateFormat("MMMM").parse(month));
} catch (ParseException e) {
e.printStackTrace();
}
int monthInt = cal.get(Calendar.MONTH) + 1;