d.wendler Posted August 20, 2013 Share Posted August 20, 2013 <queryString language="MongoDbQuery"> <![CDATA[{ collectionName: 'orders', findQuery : { customer: 12834, _id: { '$gte': ObjectId(Math.floor((new Date() - (1000*60*60*24*1) / 1000).toString(16) + "0000000000000000") } }, sort: { attr.order_No: -1 } }]]> </queryString>[/code] Whats the correct usage for that? Why is the documentation so whack?Can anybody provide information on the Date object usage or how to get Documents within the past N days ? Link to comment Share on other sites More sharing options...
abroitman Posted August 29, 2013 Share Posted August 29, 2013 Hi,Here is a link to a page detailing how to perform a date range search on documents: http://cookbook.mongodb.org/patterns/date_range/ Please note, that while Jaspersoft is allowing and enabling a connection to MongoDB, the query language documentation and support are provided by MongoDB.Thanks,Assaf Link to comment Share on other sites More sharing options...
marianol Posted January 21, 2014 Share Posted January 21, 2014 The documentation for the MongoDB query language is here: http://community.jaspersoft.com/wiki/jaspersoft-mongodb-query-language remember that you need to use Strict JSON since that is what the Mongo Java driver is expecting.There is also a wiki article that talks about using Date Parameters in MongoDB Queries 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