Ok, I don't know if the title is correct, but I'll give it a try.
I have 2 questions:
I have stored 2 Dates in one row in one table. For instance:
+-------+--------+
| 12:00 | 13:15 |
+-------+--------+
Now I want to calculate the difference between these two times. In the example above the difference would be 1 hour and 15 Minutes. I want it to display like "1,25". How do I calculate this? If I have (e.g) 20 rows and I want to calculate and display 20 differences.
My second question is: How do I calculate the 20 differences? Like this:
1,25 ; 2,30, 1,45; 7,15; and so on. And I want the sum of all the 20 differences. I hope you understand what I mean.
Like 1.25 + 2.30 + 1.45 + 7.15 etc.
I'd appreciate any help.
I have 2 questions:
I have stored 2 Dates in one row in one table. For instance:
+-------+--------+
| 12:00 | 13:15 |
+-------+--------+
Now I want to calculate the difference between these two times. In the example above the difference would be 1 hour and 15 Minutes. I want it to display like "1,25". How do I calculate this? If I have (e.g) 20 rows and I want to calculate and display 20 differences.
My second question is: How do I calculate the 20 differences? Like this:
1,25 ; 2,30, 1,45; 7,15; and so on. And I want the sum of all the 20 differences. I hope you understand what I mean.
Like 1.25 + 2.30 + 1.45 + 7.15 etc.
I'd appreciate any help.
Comment