Taken from The Vaults of Erowid
http://www.Erowid.org/psychoactives/psychoactives.shtml
General Information
The first thing to know about GHB and drug tests is that neither GHB nor its metabolites (the substances it is broken down into by the body) are tested for in the standard drug test. The basic drug test, currently used for nearly all testing programs (corporate, school, sports & judicial), checks for 5 types of substances
1. Cannabinoids (marijuana, hash)
2. Cocaine (cocaine, crack, benzoylecognine)
3. Amphetamines (amphetamines, methamphetamines, speed)
4. Opiates (heroin, opium, codeine, morphine)
5. Phencyclidine (PCP)
Even the extended drug tests used by most companies do not test for the presence of GHB or its metabolites. We have heard from one individual who went in for a standard drug test while under the influence of GHB. He passed with no problem. For more information on the basic and extended drug tests...see the Drug Testing Vault.
Detection Period
It is, however, technically possible to detect GHB with a drug test, but only for a very short period after use. Nearly all of the metabolites are gone from the body within the first 24 hours. Because they are so uncommon, these tests are much more expensive to give than the basic test. We have never heard of an individual being tested for GHB without a very specific reason to think they have it in their system, as would be the case with someone who believes they were given GHB by someone else (some date rape cases) and in some autopsy).