In America they often seem to tell people around 12 weeks, there was a lot of speculation on a forum I used to frequent, as to its accuracy...I ended up doing a lot of reading on google and it turned out that in studies done, most (98%) of the 'guesses' or tries by the sonographers being tested, were correct at 12 weeks.
I know there are policies here to prevent them getting into trouble over it but yes, if you are experienced and know what to look for, and if infant is in prime position, you can tell. Mostly. I think.
(if you manage to find a website with pictures of early external genitalia, they do look very similar indeed up till around that point. So Goodness knows how they tell!)