↧
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 ArticleAnswer 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 ArticleHow 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