Using a datetime picker and get time in Milli using it get period fro two date pickers.
I have two DatePickers based on user input data is stored in Calendar variable to display in a textview.
LocalDate today = firstdate;
LocalDate secondDate = userpicked date;
Period p = Period.between(today, secondDate);
System.out.println("Date Difference is:" + p.getYears() + " years, " +
p.getMonths() +
" months, and " + p.getDays() +
" days + p.getHours "hours" + p.getMinutes "minutes");
To have for example: Date Difference is: 53 years, 4 months, 29 days, 7 hours, and 30 minutes.