Passing Custom Date to DateExpression

18 views
Skip to first unread message

sasikanth dale

unread,
Oct 6, 2016, 7:09:38 PM10/6/16
to Querydsl

How can i use the custom date instead of current date to achieve the below functionality. Goal is to use between and coalesce in date filtering.  Can any one suggest me a way to achieve this.

DateExpression dateParam = Expressions.currentDate();
dateParam.between(qEntity1.startDate, qEntity.endDate.coalesce(dateParam)));

Thanks

sasikanth dale

unread,
Oct 11, 2016, 1:34:33 PM10/11/16
to Querydsl
DateExpression customDate = new DatePath(Date.class, "10/11/2016");
Reply all
Reply to author
Forward
0 new messages