I'm using `SpringBoot 2.2.6` and `JPA` and I want to do a query with multiple Criteria (with Dates).

Just for try I have do something like this (as read here):

```
@Override
public Predicate toPredicate(Root<T> root, CriteriaQuery<?> query, CriteriaBuilder builder) {
....
Path<Date> entityDate = root.get("dataInserimento");
java.util.Date from = null;
java.util.Date to = null;
java.sql.Date ff = null;
java.sql.Date tt = null;
        try {
            from = localeIta.parse("2000/10/10");
            to = localeIta.parse("2020/10/10");
            ff = new java.sql.Date(from.getTime());
            tt = new java.sql.Date(to.getTime());
        } catch (Exception e) {}
predicates.add(builder.between(entityDate, ff, tt));

```

but doesn't work. If I use `java.util.Date` I get an error and even if I don't use `Path<Date>` to retrieve the Date to confront I obtain an error.

This way I haven't error at runtime but no result.

Can you help me?
Thanks