If the question is How soon will a urine test come up "clean", table 1 in
http://www.csc-scc.gc.ca/text/pblct/...133/133q_e.pdf says 1-2 days. That is, of course, not the same as having overcome an addiction.
Drug InfoNet - Faqvico - [general] says 24-36 hours, but then says "to be sure", 5 days is a safer interval.
If you are worried about them testing your hair, that's a different story.
Hair Drug Test | Pass Hair Drug Test is possibly not a particularly objective site as they are selling products to cleanse hair of drug metabolites. (I have no idea if that works). They speak of drugs being detectable for 90 days in hair.
Time to re-watch the movie Gattaca for tips on passing biological tests?