Your condition
WHERE tStart >= '2011-04-04' AND tEnd <= '2011-04-04'
To a large extent, ensures that the only entries to be left are where
tStart = tEnd = '2011-04-04'
It goes without saying that the DATEDIFF in between gives 0 for a total of 0. In fact, the DATEDIFF ignores the time part, so you need to use TIMEDIFF + TIME_TO_SEC
SELECT SUM(TIME_TO_SEC(TIMEDIFF(tEnd, tStart))/60)
FROM tasks
WHERE tStart >= '2011-04-04' AND tEnd <= adddate('2011-04-04', interval 1 day)
WHERE. , , ( start < end)
WHERE tStart >= '2011-04-04'
AND tEnd < adddate('2011-04-04', interval 1 day)
2011-04-05, < () , .