/ Published in: Java
Expand |
Embed | Plain Text
try { date = formatter.parse(trailLoginDate); // TODO: handle exception } calendar1.setTime(date); long milliseconds1 = calendar1.getTimeInMillis(); long milliseconds2 = calendar2.getTimeInMillis(); long diff = milliseconds2 - milliseconds1; long diffDays = diff / (24 * 60 * 60 * 1000); days = (int)diffDays;
You need to login to post a comment.
