Fix the SoQL date queries