add a date based query