U.S.business software maker Salesforce.com Inc posted better-than-expected quarterly results and raised its outlook for the full year, sending its shares up 9 percent on Thursday.

Salesforce, a pioneer in a field known as software as a service, or SaaS, said it added 3,900 new customers in the July quarter and a weakening US dollar helped it boost revenue 20 percent.

Salesforce said it was seeing signs of demand stability but stopped short of predicting any recovery. It expected no change in the IT spending environment for the rest of its fiscal year.

Stabilization is improvement, Chief Executive Marc Benioff said in a telephone interview.

The company also said it still expected new business for the full year to be flat to slightly down.

Kaufman Bros analyst Karl Keirstead said bookings growth had been slowing over the past year, so many were surprised when it snapped back in the fiscal second quarter.

They evidently closed a lot more business in the July quarter than I think the Street was picking up in the field, and given that they've also raised their revenue and earnings guidance ... it's top-to-bottom an upside surprise.

The company posted a net profit of $21.2 million, or 17 cents a share, in its fiscal second quarter, ended July 31, up from $10 million, or 8 cents a share, in the year-ago period.

That beat analysts' average forecast of 15 cents a share, according to Reuters Estimates.

Salesforce sells its software as subscriptions and books revenue over the course of at least a year. Deferred revenue on the balance sheet was $549 million, an increase of 14 percent.

Revenue rose 20 percent to $316.1 million, ahead of Wall Street's forecast of $312.8 million.

The company raised its forecast for fiscal 2010, noting that the dollar has weakened 2 to 3 percent since it last gave guidance. It now expects earnings of 60 to 61 cents a share on revenue of $1.27 billion to $1.28 billion

For the current quarter, Salesforce forecast earnings of 15 to 16 cents a share on revenue of $323 million to $324 million.

Shares of San Francisco-based Salesforce closed at $46.18 on the New York Stock Exchange and rose to $50.24 in extended trading. (Reporting by Gabriel Madway. Editing by Robert MacMillan, Steve Orlofsky, Leslie Gevirtz)