+ Start a Discussion

trying to understand numberformat or setscale()???


   I have a soql query 

Select unitprice from opportunitylineitem


the unit price in VF brings back 1000.0

My boss wants it as 1,000.00...


So I tried the following:

public string unitprc{get;set;}


        unitprc = ql.Unit_Price__c.setScale(2).format();


This bought back 1,000 no decimal????


I thought this was suppose to bring back decimal..

Can someone suggest please...