I want to fetch results between 2 dates using following code.
def c = TestCase.createCriteria()
resultss = c.list {
like("testStatus", "Dummy")
and {
between("testTime", date1, date2)
}
order('testified','desc')
}
Here I want to select From Date and To Date like below
FROM DATE : '2014-11-07 12:14:03'(date1)
TO DATE : '2015-01-09 08:14:12'(date2)
I tried a lot but no luck to get it run.
Can anybody please tell me how to do that?
the
and
there is odd; first of all and is the default anyway. and if you want to be explicit, then put the statements into the and block:or just