You need to look at this problem slightly differently. For example, the periods that you are looking for are as follows:
11-20-2011 01:00:00 until 11-22-2011 1:00:00 in two hour intervals
If you convert the date to the format YYYYMMDD and the time to simply the hour HH then we can do something
SELECT Date_format(date_time, '%Y%m%d'),
Floor(( Date_format('%H') - 1 ) / 2),
Avg(input_calibrated)
FROM inputs
WHERE ( date_time BETWEEN $startdate AND $enddate )
AND ( chan_id = $chan_id )
GROUP BY Date_format(date_time, '%Y%m%d'),
Floor(( Date_format('%H') - 1 ) / 2);
Basically we subtract 1 from the hour and then divide by 2. So 01:00 will return FLOOR((1-1)/2) or 0, 02:00 will return FLOOR((2-1)/2) or 0, 03:00 will return 1 and so on. As we are grouping by the date and the interval you will have all the results returned for every two hour period between the intervals selected.