Take a look at this Wikipedia link, it says it can detect up to 6 months, but in general they test only the hair associated with the last 90 days. Alsoif your hair is around 3-5 cm or less (about an inch - inch and a half) it will be gone, in general every 1 cm (about a half inch) of hair measured from the scalp represents the last month and anything you took should show up. But this varies person to person.
Drug test - Wikipedia, the free encyclopedia