The parent will leave the baby on the second night at midnight. If it has been at least 24 hours since your tamagotchi had the baby you can set the time to one minute before midnight and the parent should leave in a minute. Then you can name the baby and start a new generation. Then that one can have a baby, and the baby will have a baby and so on.
The baby will stay with the parent for 48 hours unpaused. (2 days). But after 48 hours have passed, the parent will leave the baby at midnight. The parent wakes up, stands next to the baby for several minutes, then leaves. When the baby wakes up, name it, and you are now on the next generation.