慕尼黑8549860
有人需要的话自己体会。这是我自己想到的方法,也许还有更好的。BasicDBObject my_time = new BasicDBObject();my_time.append("$substr",new Object[]{ "$in_time",8,2});DBObject time = new BasicDBObject();time.put("my_time", my_time);DBObject project = new BasicDBObject().append("$project",time);