Android examples for java.util:Time
get Time Field via Calendar
//package com.java2s; import java.util.Calendar; import java.util.Date; import java.util.GregorianCalendar; public class Main { private static int getTimeField(Date time, int field) { Calendar calendar = GregorianCalendar.getInstance(); calendar.setTime(time);//from ww w .ja va2s . com return calendar.get(field); } }