How many months do yo need to be so they can tell you what the gender is?

Elizabeth
How many months do yo need to be so they can tell you what the gender is?