This tutorial will teach you how to make a Retirement date Calculating System Step by Step. Paste the Code inside the Ok button SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd"); String issuedate = df.format(jdate.getDate()); Calendar c = Calendar.getInstance(); txtjdate.setText(df.format(c.getTime())); c.add(Calendar.YEAR, 40); txtrdate.setText(df.format(c.getTime())); I have attached the video tutorial below it will help you to do this step by step.