public static <D extends Comparable> DateTimeExpression<D> datetrunc(DatePart unit, DateTimeExpression<D> expr) {
        return Expressions.dateTimeOperation(expr.getType(), DATE_TRUNC_OPS.get(unit), expr);
    }
Truncate the given datetime expression

@param unit datepart to truncate to
@param expr truncated datetime
querydsl-sql/src/main/java/com/querydsl/sql/SQLExpressions.java