add startDate and endDate for the query