In the 17th week, it is possible that they can already tell you the sex of the baby. However, in the Social Security, this ultrasound is performed a little later, around the 20th week of pregnancy.
However, there are other methods by which the sex of the baby can be known as early as week 17.