I have time in milliseconds, now I want to separate time and date from these milliseconds.
milliseconds
time
date
how
Use a Calendar to get the values of different time fields:
Calendar cal = Calendar.getInstance(); cal.setTimeInMillis(timeInMillis); int dayOfMonth = cal.get(Calendar.DAY_OF_MONTH); int monthOfYear = cal.get(Calendar.MONTH);