Моя коллекция ниже:
{
"_id" : ObjectId("5d88953e7a20304f3c76f264"),
"purchaseId" : "5d88953e7a20304f3c76f263",
"partId" : "5d2584b5d24e8b3f0885737b",
"SellPrice" : "1885",
"TotalAmnt" : "2667.24",
"Tax" : "28",
"Discount" : "8708",
"Quantity" : "2",
"Price" : "1985",
"Per" : "PCS",
"DiscountAmnt" : "32.815",
"Sgst" : "373.41",
"Cgst" : "373.41",
"Igst" : "746.83",
"TotalAmntData" : "3414.06",
"salecostprice" : "1707",
"finalqtydata" : "4",
"part" : "542746990101",
"purchaseStatus" : "0",
"datetime" : "2019-09-23",
"__v" : 0
}
Я пробую этот запрос
db.purchaseitems.find({ "part" : "542746990101":{ $gte: "datetime" : "2019-09-23", $lte: "datetime" : "2019-09-23")}});