About 72 hours. I'd be more concerned with possible side effects it cause while it's in there.
Vicodin contains acetaminophen and hydrocodone and is narcotic analgesic. It is not used during pregnancy but after weighing risk benefit ratio, because it can cause breathing problem and withdrawal symptoms in baby. You have taken it at 36 week of pregnancy and only 3 tablets, it is possible that your baby might not affected by the drug but chances are