Tim Lincecum was treated Tuesday for flu-like symptoms and dehydration. ((Marcio Jose Sanchez/Associated Press))

San Francisco Giants pitcher Tim Lincecum was hospitalized Tuesday in New York, forcing the first-time all-star to miss Major League Baseball's all-star game at Yankee Stadium.  

Lincecum, 24, felt ill earlier in the day and was transported from his hotel to a Manhattan hospital, where he was treated flu-like symptoms and dehydration.

The right-hander was released from the hospital in the afternoon.

"He is resting comfortably," Giants spokesman Matt Chisholm said.

Lincecum missed the Red Carpet parade up Sixth Avenue and his uniform remained untouched in the locker between Ben Sheets and Edinson Volquez as the National League all-stars took to the field in the 79th midsummer classic.

"I think it was just one of those things that just hit him this morning," Giants reliever Brian Wilson said.

Lincecum has been sensational for the Giants, posting an 11-2 record in 20 appearances with a 2.57 earned-run average and a major-league high 135 strikeouts.

He has lost just once in his last 14 starts.

Lincecum went 7-5 with a 4.00 ERA in 24 starts as a rookie last season. 

With files from the Associated Press