通过构造BasicDBObject对象来进行查询 [java] view plain copy int startYear=2015,endYear=2016; int startMonth=12,endMonth=1; int startDay=1,endDay=1; BasicDBObject query= new BasicDBObject("applydate", new BasicDBObject("$gte", new Date(startYear - 1900, startMonth - 1, startDay)).append("$lt", new Date(endYear - 1900, endMonth -1, endDay)));//因为无法确知当前月有多少天,所以就从当月的1号(包含)计到下月1号(不包含) int iCount = cltApplies.find(query).count(); System.out.println(iCount);