to get the current date and time
final Calendar c = Calendar.getInstance(); mYear = c.get(Calendar.YEAR); mMonth = c.get(Calendar.MONTH); mDay = c.get(Calend
Better to use Calendar
Calendar cal=Calendar.getInstance(); cal.set(Calendar.YEAR,myear);
(i.e)
cal.set(Calendar.YEAR,2016);