1) What format is the date saved in the database? greateThanOrEqual with a formated date string seems funny. 2) You could also define the dateTo of the Date object as endtime field, so the field si disabled and the constraint is added to all queries by the core.