title: getting date from timestamp in PostgreSQL
body: <p>I have a PostgreSQL timestamp as</p>
  
  <pre><code>2009-12-22 11:01:46
  </code></pre>
  
  <p>I need to change this to date as</p>
  
  <pre><code>2009-12-22
  </code></pre>
  
  <p>So that I can compare the dates in <code>postgreSQL</code>  </p>
  
  <p>How can I achieve this transformation?</p>