Ultrasound and finding out the baby sex

Azay
I'm curious as to when's the earliest time you can get a ultrasound done I'm currently 1 month and when's the earliest to tell the baby sex?