function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
shan876shan876 

trying to understand numberformat or setscale()???

Hi:

   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...

Thanks