This is another question that is hard to answer. It depends on what your definition of knowing how to play bass is and how much time you devote to practice. With lessons and practice you will be playing simpler songs in a few weeks. It takes about six months to a year to get the basics down. Rock and blues are easier to learn. That’s what I think students should play in the first year. The rhythms and techniques used in funk are a little more work and may take several years of study to get down correctly. Jazz bass has a lot to it and will take a number of years of study to get fluid with it. All these times are just general estimates. It’s never the same for anyone.
A lot of people think the bass is easy to play. It can be. As a bass player you can get away with playing very little and still fill the role you need to fill in a group. In that sense bass playing can be easy. Being a good bassist , however, is not easy at all. It requires a lot of work. Being a good musician on any instrument is a major undertaking. Bass is not harder or easier than anything else. In my opinion, you could easily spend two or three lifetimes learning about music. That’s one of the great things about music.