Template
single collection
multiple collections
mgodatagen
update
indexe
explain
Stage
Database
bson
mgodatagen
[{"period":{"start":1667466000000,"end":1667469600000}}]
Query
db.collection.aggregate([{"$project":{hour:{"$subtract":[{$hour:{"$toDate":"$period.start"}},1]}}},])
Result