get Different Milli Seconds between two date value - Android java.util

Android examples for java.util:Millisecond

Description

get Different Milli Seconds between two date value

Demo Code


//package com.java2s;

import java.util.Date;

public class Main {
    public static long getDiffMilliSec(Date date1, Date date2) {
        return date1.getTime() - date2.getTime();
    }/*  w  w  w .jav a2s .  com*/
}

Related Tutorials