title: Mysql date function not working for less than
body: <p>I need to get all records those equal and less than 2012-12-28 i used bellow query for this,
  booking_time is DATETIME field, and there are records less than 2012-12-28 but it returns zero rows.
  does anyone has idea ?</p>
  
  <pre><code>SELECT * FROM ctx_bookings WHERE DATE(booking_time)&lt;=2012-12-28 ORDER BY id ASC
  </code></pre>
  
  <p>Table filed</p>
  
  <pre><code>+---------------------+
  | booking_time        |
  +---------------------+
  | 2012-12-20 03:10:09 |
  | 2012-12-25 02:10:04 |
  +---------------------+
  </code></pre>
  
  <p>Please anybody know why is this happening ?</p>