I need to get complete date(dd/mm/yyyy) which is 18 years from now. i used code as Calendar calc = Calendar.getInstance(); calc.add(Calendar.YEAR, -18); which retrives 18 years
I would recommend using Joda Time, as it will make date manipulation and math very easy. For example:
DateTime futureDate = new DateTime(); futureDate.minusYears(18).minusDays(1); futureDate.toDate(); // return a regular Date object