Cannabis can be detected in a urine test for up to 7 days after a single use. For chronic or heavy users, it may remain detectable for up to 30 days.