一:按时间段查询
db.basketball_odds.find({ matchTime:{$gt:ISODate("2024-11-26"),$lt:ISODate("2024-11-27")}})
.projection({})
.sort({_id:-1})
.limit(200)
二:按时间段删除
db.basketball_odds.remove({
matchTime:{$gt:ISODate("2024-11-26"),$lt:ISODate("2024-11-27")}
})
mongdb find时间段查询
阅读 5
2024-11-26
一:按时间段查询
db.basketball_odds.find({ matchTime:{$gt:ISODate("2024-11-26"),$lt:ISODate("2024-11-27")}})
.projection({})
.sort({_id:-1})
.limit(200)
二:按时间段删除
db.basketball_odds.remove({
matchTime:{$gt:ISODate("2024-11-26"),$lt:ISODate("2024-11-27")}
})
相关推荐
精彩评论(0)