Just convert Date to DateTime and then use Days#daysBetween() . DateTime has a getter constructor that returns exaccty, which.
DateTime lastDate = new DateTime(Obj.getAccepted().getTime()); DateTime currentDate = new DateTime(); int days = Days.daysBetween(lastDate, currentDate).getDays();
source share