Here you can find the source of getTimeImMillis(Date date)
public static long getTimeImMillis(Date date)
//package com.java2s; //License from project: Apache License import java.util.Calendar; import java.util.Date; public class Main { public static long getTimeImMillis(Date date) { Calendar cal = Calendar.getInstance(); cal.setTime(date);// w w w . j a v a 2s. c o m return cal.getTimeInMillis(); } }