vinayak jog, there are two things wrong with your code:
1) mm does not print out the month but the minute.
2) format will only throw a NullPointerException so you shouldn't surround it with a try-catch block. It's completely unnecessary. It's the parse method that can throw a ParseException.