Java Timestamp Field getIntervalInDays(Timestamp from, Timestamp thru)

Here you can find the source of getIntervalInDays(Timestamp from, Timestamp thru)

Description

get Interval In Days

License

Apache License

Declaration

public static int getIntervalInDays(Timestamp from, Timestamp thru) 

Method Source Code


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

Related

  1. getFormattedTimeStamp(long millisSince1970)
  2. getFromTimestamp(Timestamp timestamp)
  3. getHms(Timestamp timestamp)
  4. getHoraHHMM(Timestamp dataHoraRef)
  5. getInterval(ArrayList times)
  6. getISOTimeStampStringFormat(Timestamp ts)
  7. getKDCTStoTimestamp(short[] in)
  8. getLocalDateTime(final long timestamp)
  9. getLocalTime(final Timestamp timestamp)