24 Sept 2012

Difference between two dates in java


/* difference between two dates in java example, calculating the difference between two dates in java */

int diffInDays=(newerDate.getTime()-olderDate.getTime())/(1000*60*60*24);