We found out with both of ours. As someone said, it is a surprise when you find out, no matter when that moment happens. Our names were long and I got tired of saying both of them, so I was happy to find out - lol. I called DD#1 "Elizabeth-or-Christopher" and DD#2 was "Christopher-or-Catherine", and it was a mouthful. "Goodness, Elizabeth-or-Christopher is really moving a lot today," or "I bought a car seat for Christopher-or-Catherine." I couldn't stand calling her "the baby," although I do know people who pick a pet name for the baby, such a "peanut" and use that until they learn the gender. I was sure DD#1 was a girl, but I thought DD#2 was a boy. I was so shocked when they said she was a girl! I was HAPPY, but shocked!
Also, I didn't get that "It's a GIRL" moment at birth with either of them.
DD#1 got into distress at the end, and had to have O2 when she was born. No one said anything until she started crying, and then the doctor said, "Thank God!" under her breath, and that's when I realized she had been in trouble. (She was fine in a few minutes - the cord was around her neck, so the closer she came to birth, the more it choked her. She would have died if I'd chosen a home birth).
DD#2 was large for gestational age and was breech. She was an emergency C-section at 38 weeks and weighed 9 lbs 12 oz. We were not 100% sure of her gender, and I'd brought a boy outfit to the hospital just in case. I was really looking forwrd to having her gender announced, but when she was born the doctor said, "Whoa! That looks like a 10 pounder!" I feared I'd given birth to a bass instead of a baby - lol. I had to ask the anestheologist, "It's a girl, right?" and he said he didn't know, he couldn't see. Finally someone said, "Yeah, she's a girl." Big letdown! (the announcement, I mean. I was thrilled to have two girls!)
So whenever you find out it will be a wonderful surprise, and if you choose to wait until birth, be prepared NOT to get that "It's a XXX!" moment.
Have a wonderful pregnancy! It's so much fun to await a little new one!