Quetion: What is the longest lenghth of time that any one soldier spent on the battlefield?
The rest of their life.
Vietnam?
That's a good question. If you asked that of every grunt who spent a year there you'd probably find no agreement. I think for most it really was hours and days of boredom interrupted my moments of stark terror. Those moments could turn into hours and days as in the Ia Drang, Khe San, many battles during Tet68, Hill 875 in Dak To, Hamburger Hill, etc.
For myself, I had two tours as a slick driver. Probably two hands would be enough to count the fleeting moments when I had the living crap scared out of me.
Why did you ask this question?
Are you talking about Americans specifically, or in general? (IIRC, some of the Japanese guys who got stuck on South Pacific islands and never got the word that the war was over were effectively on war footing for about 30 years.)