Java examples for java.util:Minute
get Minutes Between Dates
//package com.java2s; import java.util.Date; public class Main { public static void main(String[] argv) throws Exception { Date date = new Date(); Date date2 = new Date(); System.out.println(getMinutesBetweenDates(date, date2)); }//from ww w .j a v a2s. c om public static int getMinutesBetweenDates(Date date, Date date2) { Long dif = (date2.getTime() - date.getTime()) / 1000 / 60; return dif.intValue(); } }