How to calculate the sum of time
I am having a jsp which is reading the total hours for each employee. However, I am reading their total hours from the DB and would like to sum the time at the grand total.
I tried to use:
But, an error is occurred that can not sum the time variable. So, how can I do that?
Time grandtotaltime =(00:00:00);
grandtotaltime = grandtotaltime + total;
My code in the jsp is:
An example of the output:
Grand Total =
What I would like is
Grand Total = 7:30:00
Thanks for the help