Android Date Interval Get millisecondsBetween(Date dt1, Date dt2)

Here you can find the source of millisecondsBetween(Date dt1, Date dt2)

Description

milliseconds Between

Declaration

public static long millisecondsBetween(Date dt1, Date dt2) 

Method Source Code

//package com.java2s;

import java.util.Date;

public class Main {
    public static long millisecondsBetween(Date dt1, Date dt2) {
        if (dt1 == null || dt2 == null)
            return 0;
        return Math.abs(dt1.getTime() - dt2.getTime());
    }//from  ww  w.  j  a  va2 s. c o  m
}

Related

  1. getIntervalHours(Date minDate, Date maxDate)
  2. getIntervalMinutes(Date minDate, Date maxDate)
  3. getIntervalYears(Date date1, Date date2)
  4. hoursBetweenDate(Date date1, Date date2)
  5. millisecondsBetween(Date dt1, Date dt2)
  6. minuteBetweenDate(Date date1, Date date2)
  7. minutesBetween(Date dt1, Date dt2)
  8. minutesBetween(Date dt1, Date dt2)
  9. offsetMinute(Date date, int offset)