Answer by taking a quote from the following article:

Charles Dillon Stengel was born on July 30, 1890, in Kansas City, Missouri. His ancestry involves German and Irish; his parents--Louis Stengel and Jennie (Wolff) Stengel--were from the Quad Cities area of Illinois and Iowa, and had moved to Kansas City soon after their 1886 wedding so Louis could take an insurance job. "Charlie" was the youngest of three children, and the second son. Charlie Stengel played sandlot baseball as a child, and also played baseball, football and basketball at Kansas City's Central High School.

The Pirates had been the only National League team to do worse than the Dodgers in 1917, finishing last. Stengel met with the Pirates owner Barney Dreyfuss to seek a salary increase, but found Dreyfuss reluctant to deal until Stengel proved himself as a Pirate. On June 3, 1918, Stengel was ejected for arguing with the umpire, and was fined by the league office for taking off his shirt on the field. The U.S. had been fighting in World War I for a year, and Stengel enlisted in the Navy. His wartime service was playing for and managing the Brooklyn Navy Yard's baseball team, driving in the only run to beat Army, 1-0, before 5,000 spectators at the Polo Grounds. He also occasionally helped paint a ship--he later stated he had guarded the Gowanus Canal, and not a single submarine got into it.  The Armistice renewed the war between Stengel and Dreyfuss, and the outfielder held out again to begin the 1919 season. Both wanted to see Stengel traded, but no deal was immediately made. By then, Stengel's position as regular right fielder had been taken by Billy Southworth, and he had difficulty breaking back into the lineup. Stengel played better than he had before he enlisted, and by the time Dreyfuss traded him to the Philadelphia Phillies for Possum Whitted on August 9, he was batting .293 with four home runs. But before being traded, Stengel pulled one of his most famous stunts, on May 25 at Ebbets Field, as a member of the visiting Pirates. It was not unusual at Ebbets Field for right fielders of either team, rather than go to the dugout after three were out, to go to the Dodgers' bullpen, in foul territory down the right field line, if they were not likely to bat in the upcoming inning. Stengel did so to visit old friends, and discovered that pitcher Leon Cadore had captured a sparrow. Stengel took it, and, called to bat in the sixth inning, quietly placed it under his cap. He received mixed boos and cheers from the Brooklyn crowd as a former Dodger, took a deep bow at the plate, and doffed his cap, whereupon the bird flew away to great laughter from the crowd.  The trade to the Phillies ended Stengel's major league season for 1919, as he refused to report unless he got a raise, and when one was not forthcoming, returned to Kansas City to raise a barnstorming team. In the offseason, he came to terms with William Baker, the owner of the Phillies, and hit .292 in 1920 with nine home runs. However, racked by injuries and no longer young for a ballplayer, he did not play much in the early part of the 1921 season. On June 30, 1921, the Phillies traded Stengel, Red Causey and Johnny Rawlings to the New York Giants for Lee King, Goldie Rapp and Lance Richbourg. The Giants were one of the dominant teams in the National League and Stengel, who had feared being sent to the minor leagues, quietly placed a long distance call once informed to ensure he was not the victim of a practical joke.

How long was he there?