1

I have a date format as

31-07-2015 11:00:50

I want to convert it in hours and minutes left from now.ie

10h:21m

I tried quite a few objects like SimpleFormat,Calendar or Date,but didn't get anywhere. The format I am using is.

dd-MM-yyyy HH:mm:ss

Any advice?

Theo
  • 3,099
  • 12
  • 53
  • 94
  • possible duplicate of [How to calculate "time ago" in Java?](http://stackoverflow.com/questions/3859288/how-to-calculate-time-ago-in-java) – dotvav Jul 30 '15 at 15:31
  • @Theo Your example does not make sense. How did you go from a date-time to ten hours and twenty-one minutes? Are you talking about how much time passed? Also, please search StackOverflow before posting. Try terms like "elapsed" and "ISO 8601" and "duration". – Basil Bourque Jul 30 '15 at 16:29
  • you are looking for remaining time like `12h:59m:10s` if time now `11:00:50`. @Theo – SatyaTNV Jul 31 '15 at 02:04

0 Answers0