Java Timestamp between(Timestamp t1, Timestamp t2)

Here you can find the source of between(Timestamp t1, Timestamp t2)

Description

between

License

Apache License

Declaration

public static long between(Timestamp t1, Timestamp t2) 

Method Source Code


//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;
    }
}

Related

  1. adjustTimestamp(Timestamp stamp, Integer adjType, Integer adjQuantity)
  2. adjustTimestamp(Timestamp timestamp, String timezone, int gmtOffset)
  3. afterMinutes(Timestamp date, long min)
  4. argMapTimestamp(Map argMap, Map argMapNotUsed, String key)
  5. beforeTimestamp2Safety(Timestamp ts1, Timestamp ts2)
  6. calcRealTime(Timestamp beginTime, Timestamp endTime)
  7. calendar2Timestamp(Calendar c)
  8. calendarToTimestamp(java.util.Calendar inCal)
  9. calToTimeStamp(Calendar cal)