I have a date of type java.util.Date
java.util.Date
I want to subtract three months from it.
Not finding a lot of joy in the API.
String startDate="15/10/1987";
Date date = new SimpleDateFormat("dd/MM/yyyy").parse(startDate); String formattedDate = new SimpleDateFormat("yyyy-MM-dd").format(date); LocalDate today = LocalDate.parse(formattedDate); String endDate=today.minusMonths(3).toString();