How long can a baby go without pooping?

I just wrote a post about how my baby hasn’t pooping in a week. I’m wondering what’s the longest a baby can go? My baby JUST turned 6 months