Quantcast
Channel: How do I compose a date range query in Mongodb's aggregation framework? - Stack Overflow
Browsing all 3 articles
Browse latest View live

Answer by jack-london for How do I compose a date range query in Mongodb's...

another syntax without too many curly bracesvar match2 = new BsonDocument() .Add("$match", new BsonDocument().Add("TimeStamp", new BsonDocument().Add("$gte", timestamp) .Add("$lte", end)));

View Article


Answer by JohnnyHK for How do I compose a date range query in Mongodb's...

You've got things swapped around in match2. It should be like this instead:var match2 = new BsonDocument {{ "$match", new BsonDocument {{ "DateTime", new BsonDocument { {"$gte", timeStamp}, {"$lt",...

View Article


How do I compose a date range query in Mongodb's aggregation framework?

My goal is to perform a match and group based on date range using mongodb 2.2 and latest c# driver.I'm having trouble creating a match query in the aggregation framework that uses datetimes. I dont...

View Article
Browsing all 3 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>