hi Paul,
i am assuming that the number you're looking from is something like yyyyMMdd or 20140115, right? if so you may wish to consider using syntax similar to this..
{datefield} >= (if hasvalue({?from}) then {?from} else 19000101)
and
{datefield} <= (if hasvalue({?to}) then {?to} else 29000101)