Here you can find the source of getIntervalInDays(Timestamp from, Timestamp thru)
public static int getIntervalInDays(Timestamp from, Timestamp thru)
//package com.java2s; //License from project: Apache License import java.sql.Timestamp; public class Main { public static int getIntervalInDays(Timestamp from, Timestamp thru) { return thru != null ? (int) (thru.getTime() - from.getTime()) / (24 * 60 * 60 * 1000) : 0; }// w w w . ja v a 2 s . c o m }