Calculate Time Difference In Android
I am new in Android.I can't find any way to calculate the time difference.So please help me. I designed a simple application. In this program I took 3 EditTexts and in these EditTe
Solution 1:
You can use standard Java api calls:
System.nanoTime()
System.currentTimeMillis()
Also, check out these twolinks for calculating time difference.
Solution 2:
An easier approach -
Date interestingDate = newDate();
different in milliseconds between the actual current date and interestingDate by doing:
(new Date()).getTime() - interestingDate.getTime();
Check the referenced answer in this link.
Post a Comment for "Calculate Time Difference In Android"