How to get month from a date in java :
DateFormat inputDF = new SimpleDateFormat(\"mm/dd/yy\"); Date date1 = inputDF.parse(\"9/30/11\");
If you read the SimpleDateFormat javadoc, you'll notice that mm is for minutes. You need MM for month.
mm
MM
DateFormat inputDF = new SimpleDateFormat("MM/dd/yy");
Otherwise the format doesn't read a month field and assumes a value of 0.
month
0