title: Trying to define method that makes datetime entries by day of week
body: <p>I have a datetime column in one of my tables (team_opps) called start_date. </p>
  
  <p>I am trying to write methods in my model that allow me to classify them as Monday, Tuesday, etc... opportunities.</p>
  
  <pre><code>  def self.friday_team_opps
      where('WEEKDAY(start_date) = ?', 4)
    end
  </code></pre>
  
  <p>In my view I am trying to call a .each on it.</p>
  
  <pre><code>  &lt;% TeamOpp.friday_team_opps.each do |team_opp| %&gt;
       &lt;%= render team_opp, :team_opp =&gt; :team_opp %&gt;
    &lt;% end %&gt;
  </code></pre>
  
  <p>Error is:</p>
  
  <pre><code>SQLite3::SQLException: no such function: WEEKDAY: SELECT "team_opps".* FROM "team_opps"  WHERE (WEEKDAY(start_date) = 4)
  </code></pre>
  
  <p>Thanks</p>