2

This is what I currently have:

BSONDocument("updated" -> BSONDocument("$gte" -> BSONDateTime(DateTime.now.plusDays(-2).getMillis),
            "$lt" -> BSONDateTime(DateTime.now.plusDays(-1).getMillis)))

However when I use this I don't get anything back from the db its just stalls, I've been waiting for a response for an hour when it usually takes seconds with other types of queries. In the DB shell the dates come up in ISODate format if that helps

thanks

zunior
  • 841
  • 2
  • 13
  • 24

1 Answers1

0

You can do it using collection.find(gte("created",BsonDateTime(epoch)))

Abhi
  • 130
  • 11