Here you can find the source of between(Timestamp t1, Timestamp t2)
public static long between(Timestamp t1, Timestamp t2)
//package com.java2s; //License from project: Apache License import java.sql.Timestamp; public class Main { public static long between(Timestamp t1, Timestamp t2) { if ((t1 != null) && (t2 != null)) { return t1.getTime() - t2.getTime(); }/*from w w w .j av a 2 s. c o m*/ return 0; } }