title: Filter by date in Google sheet
body: <p>I am having trouble filtering data by dates which will filter only active permits.
  I have a set of data coming in through an importrange.(A1)</p>
  <pre><code>=ImportRange(&quot;https://docs.google.com/spreadsheets/d/1aA_yAOnGa_yJOguCd9f24qWohFj3ciBCwqZiBfIf2Z4/edit?usp=sharing&quot;,&quot;Formula1!M1:Q10&quot;)
  </code></pre>
  <p>Today's date is set (G2)</p>
  <pre><code>=TODAY()
  </code></pre>
  <p>I showed the wished result under active permits</p>
  <p>Under test formula you can see the formula I put, but only one line comes up.</p>
  <pre><code>=query({A1:E},&quot;select Col1,Col2,Col3,Col4,Col5 where Col1 is not null &quot;&amp;if(len(G2),&quot; and Col3 &lt;= date '&quot;&amp;text(G2,&quot;yyyy-mm-dd&quot;)&amp;&quot;' &quot;,)&amp;if(len(G2),&quot; and Col4 &gt;= date '&quot;&amp;text(G2,&quot;yyyy-mm-dd&quot;)&amp;&quot;' &quot;,)&amp;&quot; &quot;,1)
  </code></pre>
  <p>I tested when instead of getting data from an importrange I get them by copy and paste and the formula works. See <code>Copy of Sheet1</code> tab</p>
  <p>The wished result is to get the query to only import the permits which are active (Today is between start and end date)</p>
  <p>Please help</p>
  <p>Link to test sheet  <a href="https://docs.google.com/spreadsheets/d/1JYedYUt15SFJ50P-8Wxv4akYLmZKTkdss9vvvMQ4hUw/edit?usp=sharing" rel="nofollow noreferrer">https://docs.google.com/spreadsheets/d/1JYedYUt15SFJ50P-8Wxv4akYLmZKTkdss9vvvMQ4hUw/edit?usp=sharing</a></p>