basically i have one time
currentTime = DateFormat.getTimeInstance().format(new Date());
and i want to calculate how much time has past since currentTime.
any ideas?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Your currentTime as above will be a String, so difficult to work with.
If you use a Date object instead:
then you can find the different in milliseconds between the actual current date and interestingDate by doing:
Also check out the Time class which you could use instead of the Date class.