I have twins (a boy and a girl) and you could tell they have a completely different temperament about two weeks after birth.
Now I’ve got 2 boys, and even at fairly young ages they were very different. I’d say by 6 months old the basics of their personalities were visible, and they haven’t changed vastly as they’ve grown.
I have given up trying to explain child development, there's just too many variables.