1 Reply Latest reply on Feb 26, 2009 3:55 PM by Chad Retz

    How do I build a query with Dates in EJB QL ?

    ermes martino Newbie

      Hi all !
      I have an EJB 3 Entity bean which issues some queries. The Queries include some Date field in the WHERE clause

      SELECT OBJECT(a) FROM TaskList AS a WHERE a.taskEndDate ='2004-09-01'

      Unfortunately Hibernate seems doesn't like it at all....it issues a

      org.hibernate.exception.DataException: could not execute query
      and beneath it:
      ORA-01861: literal does not match format string

      Unfortunately I cannot use named parameters in my Query. Query are stored in the DB as shortcuts so they have the Date hardcopied in it.

      Is there a to_date equivalent in HSQL ? any help?