Moses wrote the Pentateuch somewhere shortly after the events of the Exodus. That would put it around 1450 BC I think the following chart is pretty accurate, although I might disagree on a few of them.
........................................................................................ The following dates are not always exact but are very good estimates.
Old Testament carm.org| Book | Author | Date Written | | Genesis | Moses | ? - 1445 B.C. | | Exodus | Moses | 1445 - 1405 B.C. | | Leviticus | Moses | 1405 B.C. | | Numbers | Moses | 1444 - 1405 B.C. | | Deuteronomy | Moses | 1405 B.C. | | Joshua | Joshua | 1404-1390 B.C. | | Judges | Samuel | 1374-1129 B.C. | | Ruth | Samuel | 1150? B.C. | | First Samuel | Samuel | 1043-1011 B.C. | | Second Samuel | Ezra? | 1011-1004 B.C. | | First Kings | Jeremiah? | 971-852 B.C. | | Second Kings | Jeremiah? | 852-587 B.C. | | First Chronicles | Ezra? | 450 - 425 B.C. | | Second Chronicles | Ezra? | 450 - 425 B.C. | | Ezra | Ezra | 538-520 B.C. | | Nehemiah | Nehemiah | 445 - 425 B.C. | | Esther | Mordecai? | 465 B.C. | | Job | Job? | ?? | | Psalms | David | 1000? B.C. | | Sons of Korah wrote Psalms 42, 44-49, 84-85, 87; Asaph wrote Psalms 50, 73-83; Heman wrote Psalm 88; Ethan wrote Psalm 89; Hezekiah wrote Psalms 120-123, 128-130, 132, 134-136; Solomon wrote Psalms 72, 127. | | Proverbs | Solomon wrote 1-29 Agur wrote 30 Lemuel wrote 31 | 950 - 700 B.C. | | Ecclesiastes | Solomon | 935 B.C. | | Song of Solomon | Solomon | 965 B.C. | | Isaiah | Isaiah | 740 - 680 B.C. | | Jeremiah | Jeremiah | 627 - 585 B.C. | | Lamentations | Jeremiah | 586 B.C. | | Ezekiel | Ezekiel | 593-560 B.C. | | Daniel | Daniel | 605-536 B.C. | | Hosea | Hosea | 710 B.C. | | Joel | Joel | 835 B.C. | | Amos | Amos | 755 B.C. | | Obadiah | Obadiah | 840 or 586 B.C. | | Jonah | Jonah | 760 B.C. | | Micah | Micah | 700 B.C. | | Nahum | Nahum | 663 - 612 B.C. | | Habakkuk | Habakkuk | 607 B.C. | | Zephaniah | Zephaniah | 625 B.C. | | Haggai | Haggai | 520 B.C. | | Zechariah | Zechariah | 520 - 518 B.C. | | Malachi | Malachi | 450 - 600 B.C. | New Testament| Book | Author | Date Written (A.D) | | Matthew | Matthew | 60's | | Mark | John Mark | late 50's early 60's | | Luke | Luke | 60 | | John | John | late 80's early 90's | | Acts | Luke | 61 | | Romans | Paul | 55 | | 1 Corinthians | Paul | 54 | | 2 Corinthians | Paul | 55 | | Galatians | Paul | 49 | | Ephesians | Paul | 60 | | Philippians | Paul | 61 | | Colossians | Paul | 60 | | 1 Thessalonians | Paul | 50 - 51 | | 2 Thessalonians | Paul | 50 - 51 | | 1 Timothy | Paul | 62 | | 2 Timothy | Paul | 63 | | Titus | Paul | 62 | | Philemon | Paul | 60 | | Hebrews | (Paul, Apollos, Barnabas . . . ?) | 60's | | James | James, half brother of Jesus | 40's or 50's | | 1 Peter | Peter | 63 | | 2 Peter | Peter | 63 - 64 | | 1 John | John | late 80's early 90's | | 2 John | John | late 80's early 90's | | 3 John | John | late 80's early 90's | | Jude | Jude, half brother of Jesus | 60's or 70's | | Revelation | John | late 80's early 90's | |