I\'ve been trying to use the aggregate function to group date fields by year:
db.identities.aggregate([ { $group : { _id : { year : {$year : \"$b
This issue is caused by the minimum date not being handled well when aggregated.
A quick workaround (if possible) is to filter the date, either through the ff:
Then aggregate.