Answers for "difference between two dates mongodb"

0

difference between dates mongodb

db.sales.aggregate( [ { $project: { item: 1, dateDifference: { $subtract: [ "$$NOW", "$date" ] } } } ] )
Posted by: Guest on December-30-2020
0

difference between two dates mongodb

db.getCollection('My_Collection').aggregate([
{ $project: { dateDifference: {  $subtract: [ "$startDate", "$endDate" ]}}}
])
Posted by: Guest on October-27-2021

Code answers related to "difference between two dates mongodb"

Browse Popular Code Answers by Language