I get this question quite often. And it really is a simple question, but with a deep answer.
The answer can probably apply to all martial arts. The amount of time will vary depending on the type of martial art you do and the amount of techniques involved. Let's just ignore these variables and assume content is the same for all martial arts.
Time is relative. A student who have trained once a week for 2 years, may claim they have trained for 2 years. Another student that have trained everyday for 2 years, can only verbalized it the same way, 2 years.
The above are very extreme examples, but what about the amount of time spent "thinking" about it too? Or shadow training?
Even for shadow training, there are different degrees of training. Does one just move and throw punches and techniques to get muscle memory? Or do they have a more vivid imagination to be able to come up with an image that throws random attacks at them.
A student that trains once a week and never gives it another thought throughout the whole week, is not going to benefit as much as those who have spent time thinking and pondering over what they have learnt.
A diligent student is more motivated, thinks deeper, understand themselves better and can come up with meaningful questions.