📅  最后修改于: 2022-03-11 15:00:34.237000             🧑  作者: Mango
代码示例2
db.getCollection('My_Collection').aggregate([
{ $project: { dateDifference: { $subtract: [ "$startDate", "$endDate" ]}}}
])