Create 2 dates :
And initialize "today" with today's date at midnight, and "tomorrow" with tomorrow's date at midnight.
Then you can do :
(...) AND sch.departureTime >?2 AND AND sch.departureTime <?3
That way you will get all of today's schedules.
Probably this may work out for you... with some amout of extra coding.
The EJB QL for the finder would be
SELECT OBJECT(o) from myBean as o where SUBSTRING(o.startdate,0,9) = ?1
startdate is a date field in the database and the finder method will take string as the parameter.
This string parameter should be the date that you want to check from the database. The default format for the date field from the database also matters in this approach.
So the finder definition would be
Collection findCustomersOnDate(java.lang.String date)
The finder will return a collection and when you print the date field, you can always get the full date(ie untruncated)