Sunday, June 6, 2010

QueryBuildRange date range between two dates

when you want to filter between two dates. use SysQuery::Range:

eg
        queryBuildRange = queryBuildDataSource.addRange(FieldNum(WRWaterShareTable, TenureExpiryDate));
        queryBuildRange.value(sysQuery::range(_expiryDateFilter,_expiryDateToFilter));

this function gives the flexibility of passing one or two dates. if you pass value in the first date only, it will search date equal to and after the date. if you pass value in the second date only, it will search dates equal to and before the date.

1 comment: