title: Compare month and year in postgres
body: <p>I'm trying this:</p>
  
  <pre><code>select * from venda where to_char(data_venda, 'MM-YYYY') = '07/2017'
  </code></pre>
  
  <p>Nothing returns.</p>
  
  <p>The database does have two records with this date: </p>
  
  <blockquote>
    <p>'21/07/2017'.</p>
  </blockquote>