public static int daysBetween(Date startDate, Date endDate) { int difInDays = (int) ((endDate.getTime() - startDate.getTime())/(1000*60*60*24)); }