title: Query comparing dates in SQL
body: <p>I have a table with  dates that all happened in the month November.
  I wrote this query </p>
  
  <pre><code>select id,numbers_from,created_date,amount_numbers,SMS_text 
  from Test_Table
  where 
  created_date &lt;= '2013-04-12'
  </code></pre>
  
  <p>This query should return everything that happened in month 11 (November) because it happened <strong>before</strong> the date '2013-04-12' (in December)</p>
  
  <p>But it's only returning available dates that happened in days lesser than 04 (2013-<strong>04</strong>-12)</p>
  
  <p>Could it be that it's only comparing the day part? and not the whole date?</p>
  
  <p>How to fix this?</p>
  
  <p>Created_date is of type <strong>date</strong></p>
  
  <p>Date format is by default <strong>yyyy-dd-MM</strong></p>