I am creating an application using HSQL. Now I need to fetch all the records using some particular date – yyyy-MM-dd, but the column is a timestamp date-type – yyyy-MM-dd-HH.mm.ss.ffffff.
How would I write a HSQL / JPA query to pick all the records using a given date from the table using the timestamp field?
I am new to HSQL & JPA. I have no clue.
With HSQLDB 2.2.8, use
WHERE datetime_column >= the_date AND datetime_column < the_date + 1in the JPQL query so that an index on the datetime_column is used for the query.