I tried to search MongoDB id in a particular date range using MongoDB query. but it's throwing an error can anyone give any suggestion.
Mongo DB Data
[{
id:1,
full_name:"naveen",
date:"2019-11-02"
},{
id:2,
full_name:"naveen123",
date:"2019-11-04"
}]
mongodb query
db.collection.find({id:1,date:{ '$gte': 2019-11-02,
'$lt': 2019-11-06 }})
datefield is a string in the input document, but you are not using it as a string in the query filter.