If you smoke infrequently, cotinine will usually be present in your urine for about four days. With regular exposure to nicotine, cotinine may be detectable for up to three weeks after your last exposure. A positive urine test depends on when you provide a urine sample relative to the last time you ingested nicotine.