title: using date time with operators
body: <p>The task i'm trying to solve is this:
  Within a square cell with sides of length 1450m that is centered on the bike station at British Museum, Bloomsbury over a 4 hour period commencing at 6am.</p>
  
  <p>I have two tables,
  the station tables and usage tables. However, after running my query, all rows are empty!</p>
  
  <pre><code>SELECT ce.stationID,
         il.name,
         il.easting,
         il.northing,
         il.capacity,
         ce.t,
         ROUND(AVG(availableBikes) ,1) as Average,
         ROUND(AVG(availableBikes)/capacity*100,1) AS Percentage
  FROM tflBikeUsagehour ce,
       tflStations il
  where il.usageId=ce.stationID
    and datetime (t,'06:00:00')&gt;6
    AND datetime (t,' 10:00:00')&lt;10
    AND il.easting BETWEEN (SELECT easting-(1450*0.5) FROM tflstations
                            WHERE name='British Museum, Bloomsbury')
                       AND (SELECT easting+(1450*0.5) FROM tflstations
                            WHERE name='British Museum, Bloomsbury')
    AND il.northing BETWEEN (SELECT northing-(1450*0.5) FROM tflstations
                             WHERE name='British Museum, Bloomsbury')
                        AND (SELECT northing+(1450*0.5) FROM tflstations
                             WHERE name='British Museum, Bloomsbury')
    and ce.t between (select datetime(t,'06:00:00')&lt;6 as tf from tflbikeusagehour)
                 and (select datetime(t,'10:00:00')&gt;10 from tflbikeusagehour)
  GROUP BY ce.t
  ORDER BY ce.t;
  </code></pre>
  
  <p>My problem is with the date time format! Am I using it wrong?</p>