get Time Millis At hour and minute - Android java.util

Android examples for java.util:Time

Description

get Time Millis At hour and minute

Demo Code


//package com.java2s;

import java.util.Calendar;

public class Main {
    public static long getTimeMillisAt(int hour, int minute) {
        Calendar today = Calendar.getInstance();
        today.set(Calendar.HOUR_OF_DAY, hour);
        today.set(Calendar.MINUTE, minute);
        return today.getTimeInMillis();
    }// ww  w  .  ja v  a 2 s  . c  om
}

Related Tutorials