It used to be: "The madder Hulk gets, the stronger Hulk gets!" and then he'd revert back when he calmed down. I always assumed it was to recharge. Now it appears Bruce Banner can change into the Hulk at will. What is the longest amount of time (either Dr. David or Bruce) Banner maintained his Hulk alter-ego before he had to turn back into a puny human?
I don't know if anyone is keeping track, so I doubt there's an official record of the longest amount of time that Banner has stayed the Hulk. There have been several periods that stretched on for months where he stayed in his green Hulk form though. This happened once during the Merged Hulk/Professor incarnation, which was basically the mind of Bruce Banner in control of the Hulk's physical form, and more recently during the events of Planet Hulk through the end of World War Hulk.
This answer is actually a simple one.
Bruce Banner, essentially, represents the calm feelings in the Banner/Hulk creature. He is the weakness in the Hulk and this is why the Hulk has always despised him.
As shown several times, the Hulk can stay angry indefinitely, while awake and with Banner in him. When, in one comic, Bruce Banner reaches the end of his natural lifespan, the Hulk essentially makes himself immortal by staying angry forever. However, it is important to note that at this point, Banner is essentially dead and gone, affording the Hulk the ability.
With Banner in and against him he can stay the Hulk as long as he doesn't calm down or sleep. Without Banner or in accordance with Banner (as seen with several versions of the Hulk), he never needs to change back.
In Thor Ragnarok movie, Banner stayed as Hulk for 2 years and he would have remained that way if he hadn't seen and heard Black Widow's message.
So, the answer is "Lifetime".