If I look at the hourglass above for more than a few seconds, I start to feel anxious. There is so much that I still want to accomplish in life - or even just today - that I'm simply not going to have time to do. So I completely understand why everyone wants to know how long it will take them to learn to play an instrument before they start the process. They want to know how much of their life they will need to dedicate to this goal, so they can decide if it is worth the sacrifice.
The problem is that there isn't a good answer to this question. I can't simply give you some statistics or a syllabus that includes everything you will need to learn and how long it should take to learn it.
From the perspective of someone who has played an instrument (or a few instruments) for decades, it's a lifelong pursuit. You're never done learning. There is always more to discover and more to create.
However, I don't think my definition of "learn" in this context is the same as the definition people are using this context. I don't consider learning to be something that ends, whereas someone else probably has some arbitrary goal in mind.
So, at what point would you say that you have officially "learned" to play an instrument? You probably don't know because you haven't started learning yet and therefore can't be expected to come up with a list of milestones.
Let's start with something else, then. Why do you want to learn to play in the first place? Maybe you just want to learn a few simple tunes to play for your own enjoyment. That might take you a couple of years. Perhaps you want to play with a community orchestra. That is going to be more like five or ten years. And if you are signing your child up for lessons? Well, children tend to discontinue lessons when they decide to try something else, or when their parents want them to try something else, or when they graduate from high school. But if your child becomes a professional musician, they are going to continue lessons on a regular basis at least until they graduate from college, and then they will continue seeking advice from other professionals throughout their entire career.
Regardless of your goals, this is a long-term commitment if you hope to accomplish those goals. However, it's also very rewarding.