public static <D extends Comparable> NumberExpression<Integer> datediff(DatePart unit,
            DateExpression<D> start, D end) {
        return Expressions.numberOperation(Integer.class, DATE_DIFF_OPS.get(unit), start, ConstantImpl.create(end));
    }
Get a datediff(unit, start, end) expression

@param unit date part
@param start start
@param end end
@return difference in units
querydsl-sql/src/main/java/com/querydsl/sql/SQLExpressions.java