"How was there night and day before God created the Sun and stars?"

Genesis 1:3-5 And God said, “Let there be light,” and there was light. And God saw that the light was good. And God separated the light from the darkness. God called the light Day, and the darkness he called Night. And there was evening and there was morning, the first day.

Compare Verse Translations

In the Genesis 1 creation story God "separated the light from the darkness" to form days and nights. Since days and nights are a result of the Earth's rotation relative to the Sun, how did God have a day and night on the first day of creation without the Sun? If the light mentioned in verse 3 was enough to provide night and day then why did he need to wait until the fourth day to make the Sun and other stars?

Christian Answers:

Secular Answers:

Referenced Verses:
Genesis 1:3, Genesis 1:4, Genesis 1:5