Dapatkan jumlah hari antara dua tanggal kueri MongoDB

db.collection.aggregate([
  {
    $project: {
      days: {
        $dateDiff: {
          startDate: "$start",
          endDate: "$end",
          unit: "day"
        }
      },
      _id: 0
    }
  }
])
Tiny Coders