How long do i have to drive before my check engine light turns off?

Replaced a mass flow air sensor in my 07 honda accord after check engine light came on. The engine light remained on after i replaced the part. Auto zone told me i would have to drive 60-70 miles in order for the computer to reset itself and clear the code causing the engine light to be on. I drove the 70 miles since and the light remains on. Any thoughts or info would be helpful.

It's a cycle like 4 or 5 days of normal driving, meaning turn off and on the car.

Or one can just hook up the scanner and clear the code.

Power to the people.

You need to complete a "drive cycle" and it has nothing to do with 60 or 70 miles or what Kenny said; "It's a cycle like 4 or 5 days of normal driving".
It is specific to your car so you'll need to look up the way to do it. It usually starts with a cold engine in the morning, all accessories off, idling for a period of time without touching the gas and then driving on the highway a specific speed and then coasting down and then accelerating at 3/4 throttle up to a certain speed. It can be completed on most cars in less than 30 minutes.

Also, you should never, ever, ever, ever buy a part from Autozone after they scan your car and tell you what to buy. They have no idea how to diagnose and the code numbers rarely indicate a problem with a sensor, it's more often a problem that the sensor sees.

Something is out of whack… Honda engines use Manifold Absolute Pressure (MAP) sensors instead of MAF sensors. They are low failure rate items. I suspect whatever was wrong before is still wrong - Auto Zone has a very poor record for identifying problems based on OBDII codes.

1. Turn car off.
2. Hold down reset button by the speedometer.
3. Turn Key into ON position(turn electricity on, but not the engine)
4. Do this without letting go of the reset button.
5. Hold on to the reset button until the light goes away or after 10 seconds.
6. Turn Engine on to make sure the light was turned off.

If that does not work, something is wrong.

Honda started using mass air flow sensors in 2003. The code will not clear itself. Maybe you got a code for the MAF sensor but the code only tells you what circuit is defective. Autozone takes advantage of people with their "free scans" It's not free if it's the wrong part and sensors are not usually returnable after the package has been opened. Take the car back to auto zone and have them clear the code.