Search This Blog

Java: substract a year on a given Date

Calendar calendar = Calendar.getInstance();
calendar.setTime(givenDate);
calendar.add(Calendar.YEAR, -1); 

No comments:

Post a Comment