Dating the Bible

The oldest Hebrew Bible writings that are still here today were written in about the 2nd century BCE. The oldest writing that has no pieces missing is a Greek translation called the Septuagint. It is from the 4th century CE (Codex Sinaiticus). The oldest parts of the Masoretic Text, which is where we get modern Hebrew Bibles, are from the 9th century CE.
Almost no biblical writing was written at the same time as the events it talks about. For example, most of the writings about Jesus Christ were written long after he lived, some of them hundreds of years after.
Table I: Chronological overview of the Hebrew Bible.
These tables show the chronology (order) of the Bible and says when in history they were written. Much of the Hebrew Bible/Old Testament may have been put together in the 5th century BCE. Most of the New Testament books were written largely in the second half of the 1st century CE. The Deuterocanonical books fall largely in between.