Java Date Difference getDiff(Date from, Date to)

Here you can find the source of getDiff(Date from, Date to)

Description

get Diff

License

Apache License

Declaration

public static long getDiff(Date from, Date to) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.util.*;

public class Main {

    public static long getDiff(Date from, Date to) {
        return from.getTime() - to.getTime();
    }/*www  .ja v a 2  s.com*/
}

Related

  1. getDateDiffDay(String begindate, String enddate)
  2. getDateDifference(String start, String end)
  3. getDateDifference(String startDateString, String endDateString)
  4. getDateDiffHour(String begindate, String enddate)
  5. getDayDiff(Date firstDate, Date secondDate)
  6. getDiffDate(String srcDate, String format, int diff)
  7. getDiffDays(Date from, Date to)
  8. getDiffDays2(Date one, Date two)
  9. getDifference(Date a, Date b)