csernak.adam001 Posted October 17, 2017 Share Posted October 17, 2017 Hello!I would like to ask a little help with the Jasper - Mongo integration. So i have a mongo collection what store a receivedDate field and a lot of other data. I would like to get data which is in a specified date interval.My query is: { runCommand: { aggregate : "kvSignalObject", ------> Target collection pipeline : [ {$limit:1000}, -------> Limitation for testing {$match:{receivedDate:{$lte:$P{date}}}}, -------> Match condition (Which is not working) {$project:{signalType:1,receivedDate:1}} -------> Target fields ]}}The "date" is a Jasper parameter. This type is java.util.Date() and his Default Value Expression is ("new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss-SSS'Z'").format(new java.util.Date())")It is return nothing, or return JSONParser exception.How can i figure out the problem? If I change the parameter to "2017-09-17T08:19:25.337Z" for example which is a valid data (Copy paste from Mongodb), then it is return nothing too.The question:My query syntax wrong or the Jasper mongodbquery cant handle the mongo date type properly in aggregation.Jasper Studio version: 6.3.0Thanks in advance! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now