Following is code for get difference between two dates (date1 and date2).
long difference = date2.getTime() - date1.getTime(); days = (int) (difference / (1000*60*60*24)); hours = (int) ((difference - (1000*60*60*24*days)) / (1000*60*60)); min = (int) (difference - (1000*60*60*24*days) - (1000*60*60*hours)) / (1000*60);
Visit : Visit My answer Here
No comments:
Post a Comment