Java examples for java.util:Minute
get Minutes Between Two Dates
//package com.java2s; import java.util.Date; public class Main { public static void main(String[] argv) throws Exception { Date start = new Date(); Date end = new Date(); System.out.println(getMinutesBetweenTwoDates(start, end)); }/*from ww w. j a v a 2s . c o m*/ public static int getMinutesBetweenTwoDates(Date start, Date end) { long diff = Math.abs(end.getTime() - start.getTime()); return (int) (diff / 1000 / 60); } }