Below the code to filter a Table that have two date field and one only Filter Date :
Enjoy !
SysQuery::findOrCreateRange(Tablename_ds.queryBuildDataSource(),
fieldNum(Tablename,
Fromdate)).
value( strFmt("(((%1==%2) || (%1<=%3) ) && ((%4==%2) || (%4>=%3)))
|| (%3==%2)",
fieldStr(Tablename, fromDate),
Date2StrXpp(DateNull()),
Date2StrXpp(FilterDate.dateValue()),
fieldStr(Tablename, toDate) ));
Enjoy !