Forums Register Login

How to calculate the sum of time

+Pie Number of slices to send: Send
Hello All,

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?

My code in the jsp is:


An example of the output:

7:15:00
0015:00

What I would like is
Grand Total = 7:30:00

Thanks for the help
+Pie Number of slices to send: Send
Nothing to do with JSP/ Moved to a more appropriate location.
+Pie Number of slices to send: Send
You could use the Calendar.add()
or you could use:
+Pie Number of slices to send: Send
Thanks for the reply.

I should use this code in the while loop?
God is a comedian playing for an audience that is afraid to laugh - Voltair. tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 2335 times.
Similar Threads
Can not Populate the form on combo box change
Problem displaying report using JSP
Helping doing a summation in JSP / JSTL Code (also need a quick code review)
Posting one selected option value in two forms
problem with html variable inside jsp
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 22:42:10.