【发布时间】:2018-03-24 01:29:46
【问题描述】:
我有一个存储具有以下结构的文档的集合:
{
"_id" : NumberLong(-6225637853094968071),
"Id" : "1585534",
"Type" : NumberInt(42),
"InDate" : ISODate("2017-10-05T18:30:00.000+0000"),
}
{
"_id" : NumberLong(-622563784353458071),
"Id" : "15832422",
"Type" : NumberInt(42),
"InDate" : ISODate("2017-10-06T00:00:00.000+0000"),
}
我想删除所有具有特定“Id”和“Type”的文档,其中“InDate”字段有时间18:30:00.000+0000。我尝试使用此查询:
db.collection.remove({
"ChannelType": NumberInt(28),
"HotelId": "1585534",
"CheckInDate": /$18:30:00.000+0000/
})
但它不起作用。如何做到这一点?
【问题讨论】:
标签: mongodb mongodb-query