As other PPs have said, there is no set time limit. Some people try to get it out of the way while others wait. It may also depend on what your church will want you to do as well.
With DS, we will have to wait a bit as he will be born during lent, and our church will not perform Baptisms during that time. But that is fine; it gives him times to build his immune system.