The beginning of the Bible (creation) is difficult to pinpoint the exact years of the events. Finding a timeline that will lay this out is difficult to find. Most scholars (biblical or secular) label Genesis 1-11 as primeval history or pre-history. Some study Bibles and academic textbooks do not dare to place a year for this portion of the Bible.
When did God create “the heavens and the earth”? The simple answer is “in the beginning”. This will be the starting point of our biblical timeline, which will be represented by the abbreviation AC (after creation).
We will be going along with the BC-AD tradition of there being no year zero. With that in mind Genesis 1:1-2:25 occurs in the year 1 AC. Genesis 5 and 10 cover hundreds of years between major events in God’s redemptive story. When we study those chapters we will be looking at the AC timeline in more detail.
Whether Genesis was written or compiled is beside the point. At some point in history the book came about and was passed down through the generations until it reached us today. There is evidence that Genesis was edited sometime after the conquest of the Promise Land (more on this later).
Putting that aside for now, let us look at who tradition claims is the human author of Genesis and the rest of the Pentateuch. Moses, the lawgiver, was given the task of recording God’s message to the Israelites. Tradition holds that Genesis was part of the message that God wanted to give to His people. This also answers the questions of where (location), when (general date), to whom (original audience), and why (reason) Genesis was written.
With Moses as the author the location was Mount Sinai, the year was 1446 or 1445 BC, and the original audience was the twelve tribes of Israel. The reason for the composition of Genesis was to tell the Israelite their history of where they came from, how they got to be in Egypt and why Yahweh had chosen them and why He brought them out of slavery and into the Promise Land.
(The above information goes for entire book of Genesis.)
There is another reason for Genesis 1 and 2, and that is God. In fact it answers the question “Who do you worship?” or “What type of god is God?” He is different than all the gods around the Israelites, a God who does not need to do battle with monsters or slay other gods in order to create the world, this is the God of Abraham, Isaac and Jacob. He speaks and it is so. Genesis 1 demonstrates the unimaginable power that Yahweh holds.
The purpose of Genesis is to begin telling the story of God and His interactions with His creation, especially humanity. A story of love and redemption that “may result in praise, glory, and honor at the revelation of Jesus Christ.” (1 Peter 1:7b, HCSB).
 Holman Illustrated Bible Handbook, 2012. Page 29.