Not too long. 6 months to 1 year and you'll have all the basic and some advanced knowledge.
It really is not about time, but rather how much you code that determines how long it takes to get really good.
If your code 8 hours a day for 1 year, you'll be really good, but it could take you 5 years to do the same if you only code 10 minutes a day.
Get it?