How do I query for a date field in MongoDB with the date only, and not times? For example, if MongoDB stores July 7, 2015 with any time, I want to match that day o
You can extract the date as string at any given format and compare it with your date at that format using aggregation pipiline
$addFields: { "creationDate": {$dateToString:{format: "%Y-%m-%d", date: "$createdAt"}}}}, {$match : { creationDate: {$eq: req.query.date}}