MongoDB:如何查询currentDate比endDate更新(过期)的单据。这些字段在同一文档中。
"startDate" : ISODate("2020-02-27T11:00:00.000Z"),
"endDate" : ISODate("2020-03-05T10:59:00.000Z")发布于 2021-06-30 15:04:29
我相信你正在寻找这个。Playground
db.collection.find({
endDate: {
"$lt": new Date()
}
})https://stackoverflow.com/questions/68186965
复制相似问题