Mongodb 如何使用反应式Mongo查询DateTime?

Mongodb 如何使用反应式Mongo查询DateTime?,mongodb,scala,datetime,reactivemongo,Mongodb,Scala,Datetime,Reactivemongo,这就是我目前拥有的: BSONDocument("updated" -> BSONDocument("$gte" -> BSONDateTime(DateTime.now.plusDays(-2).getMillis), "$lt" -> BSONDateTime(DateTime.now.plusDays(-1).getMillis))) 然而,当我使用它时,我没有从数据库中得到任何反馈,它只是暂停,我已经等待了一个小时的响应,而其他类型的查询通常需

这就是我目前拥有的:

BSONDocument("updated" -> BSONDocument("$gte" -> BSONDateTime(DateTime.now.plusDays(-2).getMillis),
            "$lt" -> BSONDateTime(DateTime.now.plusDays(-1).getMillis)))
然而,当我使用它时,我没有从数据库中得到任何反馈,它只是暂停,我已经等待了一个小时的响应,而其他类型的查询通常需要几秒钟的时间。 在DB shell中,如果有帮助的话,日期将以ISODate格式显示

谢谢

您可以使用
collection.find(gte(“created”,BsonDateTime(epoch))

您是否尝试在mongo shell中运行相同的查询?