There is no one good answer to that - drugs can stay in the baby's body anywhere from a few hours up to 30 days. The fact that something will be detectable or not depends on many factors, including:
The type and amount of the drug;
The matrix used for testing (meconium, urine, umbilical cord);
Individual baby features, like metabolism, genetics;
Medical conditions; and
Hydration, activity during the day.
Read more