Many times in the Puranas, it is taught that intercourse on the even nights of a woman's menstrual cycle will result in the birth of a boy, while intercourse on odd nights will lead to the birth of a girl:
Brahma Purana - Chapter 113
75 In the case of the people of all castes, a woman in her monthly course should be avoided for the first four nights. To prevent the birth of a female child, one shall avoid the fifth night also.
76 Thereafter he shall carnally approach her on the sixth night or other excellent nights even in number. Boys will be born (if intercourse is carried out) on even nights and girls on nights odd in number.
Padma Purana - Book 5, Chapter 9
46 The period of menstruation lasts for sixteen days. Out of them four are extremely censured. Out of them (intercourse on) the even days causes the birth of a son and (on) the odd ones causes the birth of a daughter.
47 He, being pure, and avoiding inauspicious (period of the) moon, so also (the constellations like) Maghā and Mūla, should cohabit with his wife, especially on (a night when) a male constellation (is predominant). She would give birth to a pure son who would help accomplish the (four) goals of human life.
Markandeya Purana - Chapter 34
80 A woman, during menstruation, should be avoided by all the castes for four nights. He should avoid just the fifth night of the moon in order to avoid the birth of females: then let him approach his wife on the sixth night, that night is the best among the even nights, my son.
81 Sons are begotten on the even nights, daughters on the odd nights: therefore a wise man who wishes for a son should always cohabit with his wife on the even nights.
82 Lawless men cohabit with their wives in the morning, and eunuchs at evening.
Brahma Vaivarta Purana - Prakrti Khanda, Chapter 36
With the increase in the blood the womb appears in the form of a mother and when it is reduced she appears like the father. At the time of conception during the even days one gets a son and by conceiving on the odd days one gets a daughter. If one conceives on Sunday, Tuesday and Thursday one gets a son and by conceiving on other days a daughter is born.
The child who is born in the first prahara of the day, such a child has short life, the one who is bom in the second prahara, enjoys middle age and the one who is bom in the third or the fourth prahara he enjoys long life. The person enjoys pleasure and pain according to his previous karmas.
This is also taught in the Manusmriti:
Manusmriti - Chapter 3
48 On the even days male children are conceived, and female ones on the uneven days; therefore one who desires a son should have recourse to ones wife on the even days of her "season".
Scientifically, the baby's gender is determined by the father's seed. The mother contributes an X chromosome to the child, no matter what. The above advice from the Hindu scriptures is completely unscientific, and false.
There is also a passage in the Vishnu Purana which, in addition to declaring that sleeping with one's head to the West or North is "unhealthy", also encourages intercourse on the even days of a woman's cycle:
Vishnu Purana - Book 3, Chapter 11
After eating his evening meal, and having washed his feet, the householder is to go to rest. His bed is to be entire, and made of wood: it is not to be scanty, nor cracked, nor uneven, nor dirty, nor infested by insects, nor without a bedding: and he is to sleep with his head either to the east or to the south; any other position is unhealthy. In due season a man should approach his wife, when a fortunate asterism prevails, in an auspicious moment, and on even nights, if she is not unbathed, sick, unwell, averse, angry, pregnant, hungry, or over-fed.
This probably reflects a preference for boys, but could also reflect a general superstition against odd nights, which once again, has no scientific basis.