It will leave between 24 to 72 hours. Depending on when you had the baby.(In other words it will take a while).
Heres a solution-Wait until 7:00 comes after you got your baby, set your clock to 11:59, your tamagotchi should be asleep and don't forget to turn off the light.
Wait a minute and the light should turn on by itself.
After a few minutes your tamagotchi should leave and light goes off.
Set the time back and name your new tamagotchi.
Hoped I've Helped a bit- Orell12
Check out my website at www.freewebs.com/Orell12-Sign my guest book and tell others.