Genesis has contradictory accounts of how long it took for heaven and earth to be created. The Bible's first creation story is the longer and better-known account of creation taking six days. The Bible's second creation story is much shorter and depicts the creation of heaven and earth requiring just one day. So how much time was required for the creation of heaven and earth?
First Creation Story
Genesis 1:3 - 2:3: And God said, Let there be light: and there was light. ... And God called the light Day, and the darkness he called Night. And the evening and the morning were the first day. ...And God saw every thing that he had made, and, behold, it was very good. And the evening and the morning were the sixth day.
Thus the heavens and the earth were finished, and all the host of them. And on the seventh day God ended his work which he had made; and he rested on the seventh day from all his work which he had made.
Second Creation Story
Genesis 2:4: These are the generations of the heavens and of the earth when they were created, in the day that the Lord God made the earth and the heavens.
Which story about the creation of "the earth and the heavens" is supposed to be correct? Were the heavens and the earth created over the course of six days as it says in one Bible story or were they created in just one day as it says in the second Bible story? The two Bible stories can't both be correct, but they can both be false.
Is this a legitimate Bible contradiction or can the two Genesis accounts of how long it took to create the heavens and the earth be harmonized? If you think you can resolve this Bible contradiction, explain how — but your solution cannot add anything new that's not already in the stories and cannot leave out any details that the Bible provides.