title: how to get only month and year in Postgres
body: <p>im newbie in query and i want to extract only month and year so how do i do that, i tried using date_part but its only extract month</p>
  
  <pre><code>select 
  case when 
  date_part('day', now()) &gt;=25 then date_part('month', now())
  else date_part('month', now())-1 end
  </code></pre>
  
  <p>can anyone help me</p>