I think it depends on how you're learning. If you're just learning songs, then all you can play are the songs you know.
If you learn the rudiments like scales, chords, and memorizing the fretboard you'll have a lot more fun once you get everything.
When you learn the building blocks you can build whatever you want. You can jam, you can play along, you can learn songs much easier. It's like if you learn to draw Dilbert, you can only ever draw Dilbert. If you learn the mechanics and basics of drawing you can draw what you want.
But your question was "How long?" and my answer would be "One year of practicing rudiments regularly."
|