title: return SQL only for Tuesdays
body: <p>I have a query that return a result between two dates(last  4 weeks) and between 2pm and 12am :
  How to filter to return only Tuesdays ?</p>
  
  <pre><code>  SELECT * 
      FROM   monitor_files 
      WHERE  trfr_type IN ( 'FTE', 'SFTP' ) 
             AND create_time &gt;= To_timestamp('20170718 140000', 'YYYYMMDD HH24:MI:SS') 
             AND create_time &lt; To_timestamp('20170819 000000', 'YYYYMMDD HH24:MI:SS') 
             AND trfr_status = 'C' 
  </code></pre>
  
  <p>This one worked for me (thanks Caius Jard):</p>
  
  <pre><code>select * 
  from monitor_files 
  where trfr_type in ('FTE', 'SFTP') 
        AND CREATE_TIME &gt;= TO_TIMESTAMP('20170718 140000', 'YYYYMMDD HH24:MI:SS') 
        AND CREATE_TIME &lt; TO_TIMESTAMP('20170819 000000', 'YYYYMMDD HH24:MI:SS') 
        AND TRFR_STATUS ='C' AND to_char(create_time, 'dy') = 'tue' 
        AND extract(hour from CAST(create_time as timestamp))  BETWEEN 14 AND 23 
  </code></pre>
  
  <p>Thanks.</p>