It really depends on the drugs and their lipophilic/hydrophilic properties. THC, the active substance in cannabis, takes the longest to leave the body. It can be detected up to 90 days with urinalysis testing.