If you're asking whether yoga will make you more flexible, then yes. Over time it will no matter where you're starting from. But the splits? No yoga clads/style I've ever tried works towards this. You probably want ballet for that.
As a yoga teacher I would say give it a try. However, there are many styles and teachers and no two teachers are the same (even if they teach the same style) so you may have to shop around a bit to find a teacher and/or style that works for you. And frequency has a lot to do with improvement. I would say a few classes a week for a few months and you should notice the difference
In terms of flexibility, it takes time. A lot of time and gentle, persistent effort. Finding a teacher that you like and who teaches in a style you can relate to is the best first step.
In terms of the splits, I don't believe that everyone can do the splits (or hanumanasana), even with lots of practice. I am a yoga teacher, I can't do full splits, although admittedly I haven't spent a huge deal of time trying. The class I attend is full of yoga teachers, and about 3 out of 20 in the class can do full splits. We usually work on it with one leg up the wall from down dog first get the stretch in the groins necessary to work on it from the ground.
I managed to do the splits after going to yoga for about 9 months but i could always do the splits and a child/teenager. But I was extremely unit and inflexible after being ill for a long time so its amazing the difference 9 months made, even if you dont get to the splits you will definitely get more flexible