you can always specify date values up to some extreme value and make sure the index is used:
SELECT
*
FROM TABLE
WHERE ....
AND [PI].Date BETWEEN ISNULL(@FromDate,convert(datetime,'1/1/1800'))
AND ISNULL(@ToDate, convert(datetime,'1/1/2500'))
source
share