Results 1 to 4 of 4
Nov 3, 2009, 16:30 #1
- Join Date
- Feb 2004
- 0 Post(s)
- 0 Thread(s)
Calculating the sum of time differences
I have the following query:
SELECT DATE_FORMAT(date_start, '%d/%m/%Y') AS Fdate_start, TIMEDIFF(date_end,date_start) AS calc_duration, type, type_detail, category FROM `delegation` WHERE (date_start >= '$date_start' and date_end <= '$date_end')
I want to be able to add all the calc_duration in the results as total_duration for example.
I tried some solutions with SUM but got nowhere.