Tuesday, 15 June 2010

Difference between two Dates in HH:MM:SS - Java -


I currently have two calendar examples that are set on a specific date and time, they are:

  Fri 14 March 2015 - 09:00:00 GMT Monday 17 March 2015 - 10:30:15 GMT  

What do I want is a way of getting the difference in the day , Hours, minutes and seconds, in one day: HH: MM: SS format. Note that the dates can be in different timezones. So in this example, the answer should be:

  3: 1: 30: 15  

Any ideas how do I get it?


No comments:

Post a Comment