title: MySQL query with DATEDIFF
body: <p>I am trying to build a query that will load records from and to specific date comparing 2 fields - the start_time and the end_date.</p>
  
  <pre><code>SELECT start_time
  ,end_time
  ,DATEDIFF(end_time, start_time) AS DiffDate
  FROM my_tbl
  WHERE start_time &gt;= '2015-04-27 00:00:00'
  AND end_time &lt;= '2015-04-28 00:00:00'
  AND end_time &gt;= '2015-04-27 00:00:00'
  AND DiffDate &lt; 100
  LIMIT 1000;
  </code></pre>
  
  <p>Unfortunately the DiffDate returns always 0. 
  The ideal scenario was to calculate the difference between start_time and end_time when inserting the end_time but the I cant make any changes on the database.
  What am I doing wrong here? Even if the DiffDate was working will it considered as a good solution?</p>