Convert date query from using like to using a date range