Nissan Repair Questions? Ask a Mechanic for Answers ASAP
You can get the code to temporarily clear using a scan tool or by disconnecting the battery for about 5 minutes. If the vehicle detects an electrical fault it can set the check engine light back on immediately once you start the vehicle. If the cause of the light is a pollution control device (oxygen sensor, catalytic converter, etc) then it will take a few miles of driving before it will come back on.
There is no way to get it to clear on the long term if there is a fault anywhere in the system.
Keep in mind, if you reset the light and the engine does not run through it's self-check completely before you get it to the trade in location then they will be able to tell that it has been reset recently. The vehicle will be in "not ready" mode- meaning that the computer has not yet completed the checks.