I need to display particular client data in between dates. Here I have used dates are timestamp. I have worked and getting data between two timestamps but it will show overall clients count, so kindly help anyone how to get particulars client data based on two timestamps
This is my between range query for all clients here I need to check based on users.
db.getCollection('invoices').find({
createdDate: {
$gt: 1554076800,
$lt: 1585699199
}
})
ClientID:"5e1d9060fe1aaa0c4"
I have tried below code but getting 0 documents
db.invoices.find({
"$and": [{
"ClientID" : '5e1d9060fe1aaa0c4'
},{
"$and": [{
" createdDate":{ "$gte" : '1554076800' }
},{ " createdDate":{ "$lte" : '1585699199' }
}]
}]
});