我试图创建此查询与碧玉报告中使用,但东西是错误与我的语法,我有2个ISODates
在我的数据库,我想接着之间进行查询,在该查询我用$match
和$gt
,$lt
。蒙戈查询日期范围ISODate格式
反正因为控制台说错误,但不`吨指定它的东西是不正确的。
Obs:问题与$match
和$lt
和$gt.
有关,因为没有它们就有可能进行查询。
代码:
{
runCommand : {
aggregate : 'saleCalculation',
pipeline : [
{
$match: {
processingInfo.modifiedDate: {$gt : ISODate("2016-05-01T09:29:40.572Z")},
{$lt : ISODate("2016-06-01T09:29:40.572Z")}
}
},
{
$project : {
header.documentCode : 1,
header.transactionDate : 1,
header.metadata.entityName : 1,
lines : 1
}
},
{ $unwind : '$lines'},
{ $unwind :'$lines.calculatedTax.details' }
]
}
}
碧玉手册说,我需要做这样的事情:
http://community.jaspersoft.com/wiki/how-query-mongo-isodate-data-parameter
,但我不明白,
没有合作;( – michelpm1
你得到任何错误 – bhuvnesh
是jsonparser错误 – michelpm1