Reputation: 1
Please Help me on this.
I had two duration times in string format: Ex: "10" and "0.30"(actually there are in minutes)
I parsed those values Double and find the find the difference?
But I am getting the output as 9.7 which is wrong I want it as 9.30.. Please suggest
Thanks in advance!
Upvotes: 0
Views: 121
Reputation:
Convert the double into minutes, Here is the link that can help you Convert the string "8:00" into the minutes (integer value).
Upvotes: 0
Reputation: 750
You can use the Joda-Time Library.Use the Period
class from which you can get the difference between two times in terms of hours and minutes.For example refer the second answer to this question
Upvotes: 1