Set start and end dates for queries