Hi ALL,
I need to get total time duration of my user in my application. I got maximum time duration he has spent for a month from the below sample query .
The output I got as below:
siteDuration---------------->::00:00:24
siteDuration---------------->::00:00:05
siteDuration---------------->::00:00:09
siteDuration---------------->::00:00:14
siteDuration---------------->::00:51:33
siteDuration---------------->::00:16:42
siteDuration---------------->::00:00:05
siteDuration---------------->::00:00:25
siteDuration---------------->::00:00:05
siteDuration---------------->::00:00:10
siteDuration---------------->::00:00:09
siteDuration---------------->::00:03:02
siteDuration---------------->::00:00:18
siteDuration---------------->::00:00:11
I need to total all the times mentioned above and get the result as total duration time. How it is possible in
java?
I have tried with Sum function in SQl, but it will not total the time(HH:MM:SS), it can total only the integer values. The resultset i am getting is set of all the max time duration the user has spent for a month, so i need to total all the values and get the output as single Time in HH:MM:SS format.
Help in java code is appreciated.