When and where did Moses write Genesis?
Jon D. Levenson states:
"In Second Temple and rabbinic Judaism, however, Genesis is treated as part of the Torah of Moses. Despite a number of demurrals on a few particular passages by major rabbis in the Middle Ages, this became the consensus of the tradition. Historical-critical scholarship, however, has identified three main sources, which it denotes with the symbols J, E, and P, that have been woven together to produce Genesis." 1
According to modern scholarship the question about date and place of the writing of Genesis is impossible to answer as there were multiple contributors at different times and places.
On the other hand, Jewish scholars living at the time of Christ attributed Genesis to Moses. Philo of Alexandria writing his commentary on creation cites the text in Genesis and begins:
While among other lawgivers some have nakedly and without embellishment drawn up a code of the things held to be right among their people, and others, dressing up their ideas in much irrelevant and cumbersome matter, have befogged the masses and hidden the truth under their fictions, Moses, disdaining either course, the one as devoid of the philosopher's painstaking effort to explore his subject thoroughly, the other as full of falsehood and imposture, introduced his laws with an admirable and most impressive exordium. He refrained, on the one hand, from stating abruptly what should be practised or avoided, and on the other hand, in face of the necessity of preparing the minds of those who were to live under the laws for their reception, he refrained from inventing myths himself or acquiescing in those composed by others. 2
Philo not only recognized Moses as the writer; he considered the creation account part of "his laws".
Additionally, the Samaritan Pentateuch is historical evidence that ancient scholars recognized Moses as the author of Genesis, Exodus, Leviticus, Numbers, and Deuteronomy. While there is no consensus on the date the Samaritan Pentateuch was first written, there is little question it was written before the time of Christ. The Samaritans not only recognized Moses as the author of the first 5 books, they rejected the other books as part of the Law.
Principles of source-criticism may be applied to this question. If the highest value is assigned to the oldest sources, the Second Temple tradition and the Samaritan Pentateuch means Moses was the author. Since the Hebrew and Samaritan scholars of the Hebrew text 2,000+ years ago recognized Moses as the writer of the first five books, Moses was the author of Genesis.
Therefore Genesis should be dated to the time of the Exodus. "Those who believe that there was an actual Exodus generally fall into two camps: those that believe that it happened in the 13th century BC, and those that believe that it happened in the 15th century BC." Byrant G Wood places the date as 1446 BC. 2
There are there two periods during which Moses could have written Genesis: before returning to Egypt or after leaving. If before the location would be Midian; if after the location was the "wilderness" (which could also include Midian). So the location can be narrowed down to the Sinai Peninsula and the date to the time of the Exodus.
It's not even agreed by scholars that Moses was the one that wrote Genesis, nor when the Exodus occurred. This makes dating the writing of Genesis completely based on opinion. For those scholars who still believe Moses wrote Genesis, (which is very few; this belief comes from rabbinical tradition) dates range widely on the basis of a scholar's dating of the Exodus.
Furthermore, if, as according to Documentary, supplementary or fragmentary hypothesis there was an individual or several individuals who later redacted the Tankah, it makes saying when it was "written" even more difficult as the complete work as we have it today was redacted much later than the earlier sources and the earlier sources may have varying dates.