Here you can find the source of daysBetween(Timestamp t1, Timestamp t2)
public static long daysBetween(Timestamp t1, Timestamp t2)
//package com.java2s; //License from project: Open Source License import java.sql.Timestamp; public class Main { public static final long DAY_MILLI = 24 * 60 * 60 * 1000; public static long daysBetween(Timestamp t1, Timestamp t2) { return (t2.getTime() - t1.getTime()) / DAY_MILLI; }/* www. jav a 2s .com*/ }