The Nasdaq rose on Wednesday, powered by a strong earnings report from Apple, while the Dow and S&P 500 turned higher after the Federal Reserve said it would keep interest rates near zero through at least 2014.

Apple Inc was the highlight early in the earnings season, which has seen corporate results trail the performance of recent quarters. According to Thomson Reuters data, of the 111 companies that have posted results, 58 percent have beaten forecasts versus a 70 percent beat rate in prior quarters.

The iPad maker was up 6.6 percent to $448 after hitting an all-time high of $454.45 on results that sailed past expectations. The move higher once again pushed Apple's market capitalization higher than that of Exxon Mobil , making it the largest publicly held U.S. company.

It's a great company; they are executing. To be that big and continue to grow that much is just an amazing, amazing thing and they don't seem to be slowing down, said Joe Saluzzi, co-manager of trading at Themis Trading in Chatham, New Jersey.

The Dow Jones industrial average <.DJI> gained 17.78 points, or 0.14 percent, to 12,693.53. The Standard & Poor's 500 Index <.SPX> added 3.03 points, or 0.23 percent, to 1,317.68. The Nasdaq Composite Index <.IXIC> rose 18.10 points, or 0.65 percent, to 2,804.74.

Greece was hoping to reach a deal with its bondholders as talks were set to resume this week to avoid a messy default. Such an outcome could threaten the stability of other debt-laden members of the euro zone as well as the global economy.

The Dow and S&P erased losses after officials at the Fed said they expected short-term rates to stay near zero at least through 2014, a longer timeframe than previously indicated.

Everything in the statement looks about the same, a little bit of an upgrade for the economy, still worried about the global slowdown, said John Canally, investment strategist and economist for LPL Financial in Boston.

The central bank will release more details about where the 17 officials in the Fed's decision-making body see rates over the next few years. A statement is due at 2:00 p.m. (1900 GMT), part of a push to improve the agency's communications.

Planemaker Boeing Co's quarterly profit rose on stronger commercial airplane deliveries, but its 2012 earnings forecast was lower than expected and its shares dipped 0.3 percent to $75.15.

Both United Technologies Corp and Rockwell Automation Inc slightly missed revenue forecasts, with earnings growth reflecting a focus on cost controls. United Tech shares added 0.1 percent to $77.83 and Rockwell dropped 3.4 percent to $79.01.

Another diversified manufacturer, Textron Inc , surged 15 percent to $24.85 after it raised its 2012 profit forecast. The S&P industrials index <.GSPI> gained 0.3 percent.

Corning Inc tumbled 10.1 percent to $13.15 as manufacturers cut back on the production of big-screen televisions that use the company's specialty glass.

Roche Holding AG made a hostile bid for U.S. gene sequencing company Illumina Inc , a major play by the Swiss drugmaker into the gene technology field. Illumina rose 43 percent to $53.91. The NYSEArca biotech index <.BTK> jumped 4.1 percent.

(Reporting By Chuck Mikolajczak; Editing by Kenneth Barry)