I want calculate the difference of two times in android: e.g. the difference between Date now and 1356033600000 ->timestamp from location.getTime()
= 2 Minutes ago
I only need the minutes! How can I do it?
I get clienttime via json. clienttime = 1356033600000
String clienttime = e.getString("clienttime");
long mTime = (System.currentTimeMillis() - Long.valueOf(clienttime).longValue()) / (60 * 1000);