Regarding how long the creation took, Peter has told us that one day with the Lord is as 1000 years.
2 Peter 3:8
8 But, beloved, be not ignorant of this one thing, that one day is with the Lord as a thousand years, and a thousand years as one day.
From reading Genesis 1, we learn that the sun, moon, and stars were not placed in relation to the earth until the 4th day of creation.
Genesis 1:14-19
14 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:
15 And let them be for lights in the firmament of the heaven to give light upon the earth: and it was so.
16 And God made two great lights; the greater light to rule the day, and the lesser light to rule the night: he made the stars also.
17 And God set them in the firmament of the heaven to give light upon the earth,
18 And to rule over the day and over the night, and to divide the light from the darkness: and God saw that it was good.
19 And the evening and the morning were the fourth day.
So at a bare minimum, the first 3 days were not the days we see today but under the 1000 year rule. But Adam and Eve still had not received their own time of reckoning until after the creation was finished. We know this from the following verse:
Genesis 2:17
17 But of the tree of the knowledge of good and evil, thou shalt not eat of it: for in the day that thou eatest thereof thou shalt surely die.
So in this verse we understand that on the very day that Adam and Eve were to partake of the fruit of the tree of knowledge of good and evil, they would die. We don't have a record of how old Eve was when she died but we know that Adam lived to be 930 years old according to our current days. Now if the command were given before Adam and Eve were given their time of reckoning, Adam and Even should have died before the end of 1000 years. We see from the record of Adam that he actually died the very same day when you take into account Peter's teachings and how long it took Adam to die.
So from this, we see that the seven days of creation were according to God's time and not Adam and Eve's time of reckoning. The creation lasted 7000 years according to the above information. And Adam, and I presume Eve, both died before 1000 years expired which according to Peter is one day unto the Lord.
It is interesting that Peter was relaying this important information for the benefit of his disciples to know when the day of the Lord will come when he will make second appearance on the earth. But that is a topic for another discussion.