Allow start or/and end dates to be specified in query