No MongoDB 3.6 agora você pode usar
$dateFromString
(https://docs.mongodb.com/manual/reference/operator /aggregation/dateFromString/
) db.logmessages.aggregate( [ {
$project: {
date: {
$dateFromString: {
dateString: '$date'
}
}
}
}, { $sort: { date : 1} } ] )