That all depends on three things.....
Your sensei/dojo/organization.... and what their standards are. Some have a time requirement AND then your skill level, and some are just your skill level. Also, the standards very greatly depending on the sensei.
Yourself.... how hard you train, how often you train, and your natural skill (do you pick it up quickly or struggle).
Your belt system.... how many belts your style has. If there is only 4 belts it will take a long time between belts. If there is 8 then the time is only half as long obviously.
But no to answer your question....it will not take you 2 years to get your yellow belt. Unless you train like once a month or something. But if you train at a regular rate then no, probably more like a few months.
Its just hard to tell... hard to put a time limit on it because of the things I mentioned. But I understand your issue, and although I agree with everyone else that the belt is unimportant and its about the journey...sometimes having a general time helps you put it in perspective.
For instance myself. I train in Shotokan. Testing for my purple belt Saturday actually... I really hope I can reach black belt before summer 2011 because thats when my sensei moves away and I graduate college and move away! But will it happen? Who knows... and I would take it even if I knew I couldn't make it in time because I love it. But it would be nice to know I have enough time lol.