long diff = endDateValue.getTime() - startDateValue.getTime(); System.out.println ("Days: " + TimeUnit.DAYS.convert(diff, TimeUnit.MILLISECONDS));