When can doctor tell gender?!

Madeline

I have an ultra sound today. I'm 16 weeks and 5 days. The doctors office saying I might have to wait until 20 weeks to find out the gender. But, I see so many women on here who know the gender before 17 weeks?!?! What the heck ...? Is my doctor full of bologna or am I just being impatient ?