title: Rails where statement with datetime.month
body: <p>I am trying to find the data points within a database (PG) whose date is within a certain month (and would also quite like to check the year is the same also)</p>
  
  <p>I have tried: </p>
  
  <p><code>my_data.where("date.month = ?", month )</code> </p>
  
  <p>where 'month' is an integer (eg from Time.new.month) but doesn't seem to work...</p>