This depends on the way you test for it. In a urine test, it can be detected for up to three days. In other tests, such as saliva, it isn’t detectable for much more than six hours.