i wanto get the trip which is happened between contractStartdate and contractEndDate+1day. but this following code gives me error.
def tripsForThisContract = Trip.executeQuery("From Trip where contract_id = ? AND startDate between ? AND DATE_ADD('?',INTERVAL 1 DAY)",[contractId,contractStarts,contractEnds])
please help me.
You should deal with the date inside your code. Hql has not all the functions of the underlying database.
Your code should be something like this :