The books (and the movies) talk about the origin of Gollum and how he first attained the one ring. It also talks about how the ring warps his mind and body (and prevent Gollum from ageing normally). But I've always been curious about how long Gollum actually had the ring for, and how long the ring had been warping and corrupting him. Is this ever talked about in the books?
Approximately 478 years.
From The Tale of Years, Appendix B of Return of the King:
2463: The White Council is formed. About this time Déagol the Stoor finds the One Ring, and is murdered by Sméagol.
2941: Thorin Oakenshield and Gandalf visit Bilbo in the Shire. Bilbo meets Sméagol-Gollum and finds the Ring.
Both years are in the Third Age calendar, which is dated from the fall of Sauron to the Last Alliance of Elves and Men.