This question has also been asked and answered here: How long does Marijuana stay in your system?
As a rough guide: if you smoke the occasionally joint, it'll stay in your system for up to 10 days. If you smoke regularly, up to 45 days and if you smoke constantly, 90 days.
As for being detectable in a drug test, well this depends on the type of drug test. Urine test will detect up to a month prior but a blood test will show positive if you've smoked any weed in the last 6 months.
Also important to note that marijuana residue is stored in the fat cells, so if you're skinny or have a high metabolism, the time it takes to leave your system may be reduced.
Search for questions
Still looking for answers? Try searching for what you seek or ask your own question.