Convert date queries to numbers before parsing them as dates