Java tutorial
//package com.java2s; import java.util.Calendar; public class Main { public static int minutesBetweenDates(Calendar from, Calendar to) { long ms = to.getTimeInMillis() - from.getTimeInMillis(); int minutes = (int) (ms / 60000); return minutes; } }