Android Time to Milliseconds Convert getTimeinMillis(int year, int month, int day)

Here you can find the source of getTimeinMillis(int year, int month, int day)

Description

get Timein Millis

Declaration

public static long getTimeinMillis(int year, int month, int day) 

Method Source Code

//package com.java2s;

import java.util.Calendar;

public class Main {
    public static long getTimeinMillis(int year, int month, int day) {
        Calendar cal = Calendar.getInstance();
        // Note that months start from 0 (January)
        cal.set(year, month - 1, day);//from   www  .  j  av  a2s .  co  m
        return cal.getTimeInMillis();
    }
}

Related

  1. time2IntMillis(String timestr)
  2. time2LongMillis(String timestr)
  3. timeStr2Secs(String s)