Date dialog Gets forceclose when it comes to December month

view full story

http://stackoverflow.com – When i click on Dialog it gets Forceclose. works fine till November. but when i select December it gets forceclose. please see the code. // ---------------- For DatePicker ---------------- @Override protected Dialog onCreateDialog(int id) { if(date.toString().length() > 0) { //12/31/1986 cmonth =(Integer.parseInt(date.substring(0,2))); cday =(Integer.parseInt(date.substring(3,5))); cyear =(Integer.parseInt(date.substring(6,10))); } else { Calendar c = Calendar.getInstance(); (HowTos)