title: mongodb filtering objects between to dates using pymongo
body: <p>Below is the document structure of my collection in MongoDB.</p>
  
  <p>Using pymongo I want to filter between the documents using date range on creation_date key which is inside record_status key.</p>
  
  <p>Here is the structure of the document:</p>
  
  <pre><code>{
      "_id" : ObjectId("5b8a199cf4a98b075490bb47"),
      "Pls_Customer_Id" : "C1810151",
      "FirstName" : "SCHNEIDER ELECTRIC INDIA PVT LTD",
      "LastName" : "SCHNEIDER ELECTRIC INDIA PVT LTD",
      "Address1" : "DELHI",
      "State" : "DELHI",
      "MobileNumber" : "989898989898",
      "DeletedFlag" : false,
      "Country" : "India",
      "record_status" : {
          "created_user" : "uploadBatchProgram",
          "creation_date" : ISODate("2018-09-01T04:46:20.055Z")
      },
      "PoliciesRef" : [ 
          ObjectId("5b8a199cf4a98b075490bb45")
      ],
      "__v" : 0,
      "customerType" : "Regular"
  }
  </code></pre>