Boy a lot of variables here..how much do you have to spend on the initial purchase, what size boat are you looking at, are you thinking coastal cruiser or crossing oceans? You can buy a ready to go, "jsut refitted but our plans changed boat" or a fixer upper and anywhere in between. But in general I'd say once the boat is the way you want it however long that takes..then at least a few months to sail her in different kinds of weather so you feel comfortable in most weather conditions..and do go out in challenging weather conditions but stay "close" to port..with a full tank of gas and clean tanks and filters just in case.
So what size? What condition? How big? and what kind of sailing?