how to pass parameter to items.find

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

how to pass parameter to items.find

super25
trying to pass date to items.find after calculating

def currentDate =  (new Date()-7).format("yyyy-MM-dd", TimeZone.getTimeZone("UTC"))

'items.find({"type":"file","created":{"$gt":"currentDate"}) is not working