title: Filter dates by day of week and by time of day
body: <p>I am looking for a way to fetch the data for Friday (dayofweek = 6) but only between 09AM and 05PM. Is this possible and it what manner?</p>
  
  <p>Ultimately from all Fridays in the past month I would like to see only data from 09AM to 5PM.</p>
  
  <p>I have a simple created_on datetime column.</p>
  
  <p>What I have tried and different variations of this query:</p>
  
  <pre><code>Select i.created_on from issues i
  where DAYOFWEEK(i.created_on) IN (6)
  and i.created_on between 'yyyy-mm-dd 09:00:00' and 'yyyy-mm-dd 17:00:00'
  </code></pre>
  
  <p>also</p>
  
  <pre><code>Select i.created_on from issues i
  where DAYOFWEEK(i.created_on) IN (6)
  and i.created_on between '09:00:00' and '17:00:00'
  </code></pre>
  
  <p>I get zero results, because I am missing something. If I put an exact date along with time then it works but I don't want to look for date, only time. Date would be any Friday.</p>