Aslong as it takes for the ammonia to be processed and bacteria to grow. You can enhance the speed by adding filter media from another processed tank into yours. and make sure that the temperatures are right along with ammonia, nitrite, nitrate and ph levels.
Anywhere from instantly to a couple of months. Instantly would be with mature filter media, and a fish-in cycle would take a couple months. Fishless would take about a month.