Unclear. The date of Wormtongue entering Saruman's employ is unknown, which makes difficult to determine when Théoden fell under Saruman's sway.
It probably wasn't too long of a time, since the Uruk-hai raids seem to be a recent development and Edoras is, while not in the best of repair, not in shambles. Appendix B puts about a year between Frodo setting out from the Shire (April 3018) and Théoden being healed (March 3019), which seems plausible.
However, it's impossible to determine when Saruman first gained the power to take complete control of Théoden's body.
In the books, Saruman never directly controls Théoden the way he does in the film. However, it is quite heavily implied that Wormtongue's influence is worsening the King's health, so we'll go with that.
According to Unfinished Tales, Gríma's influence over Théoden peaked in T.A. 3014, four years before the events of Fellowship, when the King's had a health crisis:
The chief obstacles to an easy conquest of Rohan by Saruman were Théodred and Éomer: they were vigorous men, devoted to the King, and high in his affections, as his only son and his sister-son; and they did all that they could to thwart the influence over him that Gríma gained when the King's health began to fail. This occurred early in the year 3014, when Théoden was sixty-six; his malady may thus have been due to natural causes, though the Rohirrim commonly lived till near or beyond their eightieth year. But it may well have been induced or increased by subtle poisons, administered by Gríma. In any case Théoden's sense of weakness and dependence on Gríma was largely due to the cunning and skill of this evil counsellor's suggestions.
Unfinished Tales Part III: "The Third Age" Chapter 5: "The Battles of the Fords of Isen"