fixing the query to be numeric date representation instead of alphanumeric