I am working on some codes to query a specific date.
I have this in my Person.groovy:
Date dateCreated
static constraints = {
dateCreated type:"date"
}
static namedQueries = {
dateMe{ q->
eq("date.created", q)
}
}
And I call it in a gsp like this:
<g:set var="dated" value="${Person.dateMe(personInstance.dateCreated)}"/>
But I got this error "could not resolve property: date of: project.Person" Am I missing something? should I format the date before querying? Please help, I would highly appreciate it.