Here you can find the source of minuteBetweenDate(Date date1, Date date2)
public static long minuteBetweenDate(Date date1, Date date2)
//package com.java2s; import java.util.Date; public class Main { public static long minuteBetweenDate(Date date1, Date date2) { long d = date1.getTime() - date2.getTime(); return d / 60000; }// w ww . j a v a 2 s . c o m }