QueryDSL - select rows with date from timestamp column

querydsl

Solution

You can either use between or a custom expression if you use Querydsl SQL

Something like this

DateExpression<Date> converted = DateTemplate.create(Date.class, "convert(date, {0})", mytimestamp);

Problem

Using QueryDSL - is there a way to select rows by date from a timestamp other than using .between? Something like this query: where convert(date, mytimestamp) = '2013-02-28'

Original source