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

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

Description

milliseconds Between

License

Open Source License

Declaration

public static long millisecondsBetween(Date dt1, Date dt2) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

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  w w  w.j ava 2  s. com
}

Related

  1. getIntervalDays(String sd, String ed)
  2. getIntervalHours(Date minDate, Date maxDate)
  3. getIntervalMinutes(Date minDate, Date maxDate)
  4. getIntervalYears(Date date1, Date date2)
  5. hoursBetweenDate(Date date1, Date date2)
  6. millisecondsBetween(Date dt1, Date dt2)
  7. minuteBetweenDate(Date date1, Date date2)
  8. minutesBetween(Date dt1, Date dt2)
  9. minutesBetween(Date dt1, Date dt2)