Java tutorial
//package com.java2s; //License from project: Open Source License import java.util.Date; public class Main { /** * elapsedMinuted * Get the elapsed minutes between two dates * * @param dateStart the date start * @param dateEnd the date end * @return the elapsed hours and minutes in a long */ public static long elapsedMilliseconds(Date dateStart, Date dateEnd) { return dateEnd.getTime() - dateStart.getTime(); } }