Template
single collection
multiple collections
mgodatagen
update
indexe
explain
Stage
Database
bson
mgodatagen
[{"key":ISODate("2002-05-21T10:59:49.966Z")},{"key":ISODate("2003-05-21T10:59:49.966Z")}]
Query
db.collection.aggregate([{$project:{date:{$year:"$key"}}}])
Result