A, Long type turn into Calendar
Calendar endCalendar=Calendar.getInstance();
endCalendar.setTimeInMillis(endTime);
Second, the acquisition date information Calendar
年:endCalendar.get(Calendar.YEAR)
月:endCalendar.get(Calendar.MONTH)
日:endCalendar.get(Calendar.DAY_OF_MONTH)
The same type Date Calendar that is one more step to turn the first into Long to Date
Long time = new Date().getTime();