My answer on how long would I take to learn programming is forever. Because, one never becomes a programmer just when they become good at writing a solution to a problem.
The only thing I would like to tell is programming is not about writing code. It is about analyzing a problem and be able to device a mechanism using which it can be solved. And to learn programming 'completely' one needs to know all the possible usecases ever made, which is not possible as per me.
I say all of this because I have started to learn code when I was around 16 and now, after 8 years of which almost 4 years of professional experience, I still don't understand lot of things and I still try to learn things from others. It's not learning to code but learning to think of a problem, find multiple possible ways to try to solve it. Finally, come out with an optimal way and trying to help others facing the same problem to make their life better :)
Hope I have answered your question :)