That's really up to the beer and to you. The majority of people on here would say let it ferment in the primary for 3 - 4 weeks. But you definitely want to take hydrometer readings for several days in a row to make sure your gravity stays consistent.
You can bottle it as soon as the hydrometer readings stay constant for 3 days. But, I find its tastes better if I let it condition in the fermenter for about a month. Its hard to leave it alone, but the taste is worth it.