0
這裏是一個示例文件如何解析ISO的Java日期格式MongoDB的
{ "userId" : "ABC,
"timestamp" : ISODate("2014-09-03T22:07:01.261Z"),
"body" : {
"id" : "0082171",
"name" : "XYZ",
"palce":"Ind"
},
}
DBObject match = new BasicDBObject();
match.put("body.id","0082171");
match.put("body.name", new BasicDBObject("$exists",1));
我得到的50999
計數當我添加日期字段的匹配標準如下我越來越沒有價值。
DBObject match = new BasicDBObject(); match.put(「data.type」,「score.type」); match.put(「body.name」,新的BasicDBObject(「$ exists」,1)); match.put(「timestamp」,「2014-09-03T22:07:01.261Z」);
我希望我的Java代碼來尋找價值
嗨馬丁,能否請您給我左右可以this..How使用java.util.Data – Aman 2014-10-09 15:09:55
一些想法@Aman我已經更新了我的答案與一些代碼 – Martin 2014-10-09 19:53:05