It depends on the drug. For example, cocaine can be found in meconium for up to 20 weeks after the mother has used the drug (source). For babies suffering from NAS, the symptoms usually last for about one week, but some babies can have symptoms between four and six months.