Android Date Interval Get secondBetweenDate(Date date1, Date date2)

Here you can find the source of secondBetweenDate(Date date1, Date date2)

Description

second Between Date

Declaration

public static long secondBetweenDate(Date date1, Date date2) 

Method Source Code

//package com.java2s;

import java.util.Date;

public class Main {
    public static long secondBetweenDate(Date date1, Date date2) {
        long d = date1.getTime() - date2.getTime();
        return d / 1000;
    }/* ww w. j  a va 2 s  .  c o  m*/
}

Related

  1. minuteBetweenDate(Date date1, Date date2)
  2. minutesBetween(Date dt1, Date dt2)
  3. minutesBetween(Date dt1, Date dt2)
  4. offsetMinute(Date date, int offset)
  5. offsetSecond(Date date, int offset)
  6. secondDiff(Date date1, Date date2)
  7. secondDiff(String startTime, String endTime)
  8. secondsBetween(Date dt1, Date dt2)
  9. getDateOffset()