title: how to write IN operator using MongoDB\Driver\Manager and MongoDB\Driver\Query
body: <p>This query is working fine for me:</p>
  <pre><code>date_default_timezone_set('asia/kolkata');
  
  $mongo = new MongoDB\Driver\Manager(&quot;mongodb://localhost:27017&quot;);    
  $bulk = new MongoDB\Driver\BulkWrite;
  $filter = [ &quot;customerans&quot; =&gt; &quot;Answered&quot; ,'created_date' =&gt; ['$gt' =&gt; &quot;$min&quot;],'created_date' =&gt; ['$lt' =&gt; &quot;$max&quot;]];                          
  $options = [ 'sort' =&gt; ['created_date' =&gt; -1] ];
  $qry = new MongoDB\Driver\Query($filter,$options);
  $date = date(&quot;Y-m-d H:i:s&quot;);
  $rows = $mongo-&gt;executeQuery(&quot;testdb.testCollection&quot;, $qry);
  
  foreach ($rows as $row) {
      echo  $row-&gt;testfield;
  }
  </code></pre>
  <p>but with can I use the <code>IN</code> operator?</p>
  <p>I need to filter date time period. Date and time period means I have field called <code>created_date</code> and I have date span like this <code>2022-01-22 10:00:00</code>, <code>2022-01-22 11:00:00</code>.</p>
  <p>How can I fetch in between these dates?</p>