Genesis has contradictory statements on God creating light and separating day from night. First Genesis says that God created light then divided light from dark on the first day. Later, though, Genesis says that God created the sun on the fourth day — but for us, it is precisely the sun which creates our light and which separates our day from our night. So when did God really separate day from night?
First Day of Creation
Genesis 1:3-5: And God said, Let there be light: and there was light. And God saw the light, that it was good: and God divided the light from the darkness. And God called the light Day, and the darkness he called Night. And the evening and the morning were the first day.
Fourth Day of Creation
Genesis 1:14-19: And God said, Let there be lights in the firmament of the heaven to divide the day from the night; and let them be for signs, and for seasons, and for days, and years: And let them be for lights in the firmament of the heaven to give light upon the earth: and it was so. ...And the evening and the morning were the fourth day
This is arguably an inconsistency rather than an outright contradiction because the "light" being created in the first creation story might plausibly be light from source other than the sun. The problem here is that the "light" in question is also called "day," and of course the stars' light do not create day. Only the light of the sun is responsible for the day. If there was day and night, then the sun had to exist. Thus this should be regarded as more of a contradiction than a mere inconsistency.