title: Excel Autofilter doesn't work on column with date and time with VBA code
body: <p>I'm having trouble when filtering date and time values together using VBA on MS Excel. When I need to filter only dates, I find no problem using the code below:</p>
  
  <pre><code>myRange.AutoFilter Field:=3, Criteria1:= _
      "&gt;=" &amp; CDbl(CDate((Date - 2))), Operator:=xlAnd, Criteria2:="&lt;=" &amp; CDbl(CDate((Date)))
  </code></pre>
  
  <p>The question is: how could I specify a time when filtering? Example: I'd like to filter results from yesterday at 19:00 until today at 8:00.</p>