“On the day that the Lord God made the earth and the heavens” – Beit Shammai and Beit Hillel, Beit Shammai say: [During creation, God’s] thought took place at night and [His] action during the day.46As it is written “on the day that the Lord God made the earth and the heavens” – the making took place during the day. Beit Hillel say: [Both His] thought and His action took place during the day. Rabbi Shimon ben Lakish said: I am astonished. How is it that the fathers of the world, Beit Shammai and Beit Hillel, disputed regarding the creation of the heavens and the earth? Rather, [His] thought took place both during the day and at night, and [His] action took place with the dimming of the sun.47Just before sunset.
Bereshit Rabbah 12:14
Bereshit Rabbah 12:14