mongo时间段查询

两种方式查询时间段
1:db.testData.find({"KaTeX parse error: Expected '}', got 'EOF' at end of input: …{"createTime":{gt:new Date(“2019-12-01”).valueOf()-860601000}},{“createTime”:{$lt:new Date(“2019-12-05”).valueOf()-860601000}}]}).count()html

2:db.testData.aggregate(
[ {
KaTeX parse error: Expected '}', got 'EOF' at end of input: … dateInfo:{"add":[new Date(0),“KaTeX parse error: Expected 'EOF', got '}' at position 22: …Time",28800000]}̲, testInfo…match”:{“dateInfo”:{“ g t " : I S O D a t e ( " 2019 10 20 " ) , " gt":ISODate("2019-10-20")," lt”:ISODate(“2019-11-13”)} } },
{KaTeX parse error: Expected '}', got 'EOF' at end of input: …id:null,count:{sum:1}}}
]
)web