search by date fix

this is a fix for the search by date command