change query datetime final