📅  最后修改于: 2022-03-11 14:58:59.152000             🧑  作者: Mango
代码示例2
db.collectionname.aggregate([
{$project: {
duration: {$divide: [{$subtract: ["$endtime", "$starttime"]}, 3600000]}
}}
])