I\'m storing date as string in \"mm/dd/yyyy\" format. I want to sort by this date field. I tried below query with few test data.
db.collection.find().sort({d
Within MongoDB 3.6 you can now use $dateFromString (https://docs.mongodb.com/manual/reference/operator/aggregation/dateFromString/)
$dateFromString
db.logmessages.aggregate( [ { $project: { date: { $dateFromString: { dateString: '$date' } } } }, { $sort: { date : 1} } ] )