Template
single collection
multiple collections
mgodatagen
update
indexe
explain
Stage
Database
bson
mgodatagen
[{"key":1},{"key":2}]
Query
db.collection.aggregate([{$project:{logoutTime:{$dateSubtract:{startDate:"$$NOW",unit:"hour",amount:3}}}}])
Result