To subtract "X" days from a date in java of calendar class object. calendar.add(Calendar.DAY_OF_MONTH, -X); add method of calendar has a option to subtract days from given date. Lets see and example program on how to subtract days from a date in j
Read this post on instanceofjava.com