select count(1)
from table t
where t.gather_time between
to_date('2011-11-27 00:00:00', 'yyyy-mm-dd hh24:mi:ss') and
to_date('2011-11-27 23:59:59', 'yyyy-mm-dd hh24:mi:ss')
from table t
where t.gather_time between
to_date('2011-11-27 00:00:00', 'yyyy-mm-dd hh24:mi:ss') and
to_date('2011-11-27 23:59:59', 'yyyy-mm-dd hh24:mi:ss')