How long did it take to collect all of the writings that eventually formed the first version of the Bible? In other words, starting with when the first writing was created (I'll say when it was completed rather than started) to when it was first printed/published/etc., how long did it take?
This question has an open bounty worth +300 reputation from Peter Turner ending in 20 hours.
The question is widely applicable to a large audience. A detailed canonical answer is required to address all the concerns.
Someone better mention the Catholic Church, Eusebius, St. Jerome, Ecumenical Councils, jamnia (at least offhandedly) Constantine, his mom and the word Codex at least twice to get this bounty
Much of when the Old Testament was written is purely conjecture, but many modern scholars believe that it was written some time in the period when the Persians captured Babylon in 538 BC. Others believe Moses authored the Pentateuch, which is Genesis - Deuteronomy, which would mean that these books were authored some time around 1300 - 1500 BC.
There is also some conjecture that Job is the earliest written account in the Bible, and would predate Moses' writings, although those who hold this theory do not believe that the actual writing of the Book of Job predates the writing of the Pentateuch by much, even though they believe that the actual account of Job happened long before, and many believe Job lived before the flood.
The last book of the New Testament is believed to have been Revelations, written in approximately 68 AD, but yet others believe that this book was written around 95 AD.
We don't know exactly when the books of the Bible were written, but we can, through cross-referencing external sources, determine when the historical figures in the Bible lived. Either way, the common consensus is that the writing of the books of the Bible began some time after 1500 BC, and concluded prior to 100 AD. This would be a period of about 1600 years.
The first known "canonization" of the Scripture was proposed by Marcion of Sinope around 140 AD. Since then there have been multiple canons of Scripture proposed, with different ones accepted by various groups, containing anywhere from 66-81 books. Currently, the typical Protestant Bible is a 66 book canon, from the 4th century synod which listed 39 books of the Old Testament. The typical Catholic Bible has 73 or 74 books, from the 4th century synod which listed 46 books of the Old Testament (5 books were merged into other books in this list, making a total of 51 books), and some Catholic Bibles also contain 2 Esdras. Both the Protestant and the Catholic New Testaments are the same 27 books.
The earliest Hebrew scripts (which were the written form of a long, long oral tradition) that eventually became the torah (the first five books of the bible) were written around 900BC, and the Tenakh (the earliest Hebrew bible) was compiled around 400BC.
The New Testament was fully written by 150 AD and after much discussion was fully compiled between 500 - 600 AD.
The old testament and the new testament together were probably written and compiled over a span of 1600 years.