Android examples for java.util:Date Time
get Current Time in HH:mm format
import java.text.SimpleDateFormat; import java.util.Date; public class Main{ public static String getCurrentFormatTime() { SimpleDateFormat format = new SimpleDateFormat("HH:mm"); String nowTime = format.format(new Date()); return nowTime; }/*from ww w . j a v a2s . c o m*/ }