It is narrated from Sayyiduna Hudhayfah bin Asid (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) said: "When forty-two nights have passed over the drop of fluid, Allah sends an angel to it. He shapes it and creates its hearing, sight, skin, flesh and bone, and says: O Lord, is it male or female? So your Lord decrees whatever He wills and the angel writes it down. Then he says: Its provision? So your Lord decrees whatever He wills and the angel writes it down. And the scroll is in his hand; he does not add to what he is commanded, nor does he reduce it."
Hadith Referenceالمعجم الكبير للطبراني / باب الحاء / 3031