SitePoint Sponsor |
|
User Tag List
Results 1 to 4 of 4
-
Nov 3, 2009, 17:30 #1
- Join Date
- Feb 2004
- Location
- sydney
- Posts
- 70
- Mentioned
- 0 Post(s)
- Tagged
- 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.
-
Nov 3, 2009, 18:18 #2
- Join Date
- Jul 2002
- Location
- Toronto, Canada
- Posts
- 39,347
- Mentioned
- 63 Post(s)
- Tagged
- 3 Thread(s)
does this help? --
http://www.sitepoint.com/forums/showthread.php?t=644910
-
Nov 6, 2009, 02:37 #3
-
Nov 6, 2009, 04:19 #4
- Join Date
- Jul 2002
- Location
- Toronto, Canada
- Posts
- 39,347
- Mentioned
- 63 Post(s)
- Tagged
- 3 Thread(s)
um, dear phpycho, those are not the same!!
Bookmarks