We now turn to surveying the development of the biblical canon of the Tanak, and that includes when they were written as well as when they became canonized. Bear in mind that the summary given here represents one view of modern scholars. Hard data on ancient literature is rather sparse and interpretation is thus sometimes controversial. This is one view of some modern scholarship.
The writing of the biblical books took place over approximately 1000 years
1. A small amount of the Bible is archaic poetry (1150-1000 BC) representing the earliest preserved literature of ancient Israel. Examples include Exodus 15, some snippets in Numbers 21, and Judges 5.
2. But the flowering of ancient Hebrew literature occurred during the 600-year period commencing with the United Monarchy in about 1000-B.C. and continuing into and beyond the Babylonian Exile.
a. The most important represent of this literary productivity is from Genesis through Kings.
b. A second category in this period is that of the classical prophets (Isaiah, Jeremiah, Ezekiel, etc.).
c. A number of other important books date to this period, too, including Psalms, Lamentations, and Ezra-Nehemiah.
3. Finally, a few biblical books were written a later stage (400-150 B.C.E.), including such works as Ecclesiastes, Esther, Chronicles and Daniel (authored in 164. B.C.).
The canonization of the biblical books is another matter. The books did not become holy or sacred or canonized overnight. Much time passed between the authorship of these books and the establishment of a canon, or collection of sacred writing,
The Jewish canon is a tripartite one: Torah, Prophets, Writings. The first letters of the three Hebrew words for these texts (Torah, Nevi'im, Ketuvim) form the Hebrew word Tanakh, meaning "the Bible." Roughly it is believed that the Torah was defined as canon by about 400 B.C., the Prophets possibly by 100 B.C. and the Writings by about 150 A.D.
The Christian Old Testament canon, by contrast, is a four-part one:
Pentateuch, Histories, Wisdom, Prophets. Christians call this the Old Testament, to which were added additional books, known as the Apocrypha (though these are not canonical in the Protestant tradition).