You need to sign in to do that
Don't have an account?

Curreny formatting in OutputText
I`m using below Outputtext to show negative values in brackets. For example, -1,000.00 to reflect as (1,000.00)
Above line works fine except that I want to get rid of decimals. Negative value should appear like this (1,000) without decimals. Can someone please suggest a better way to achieve this? Can I achieve this using LEFT or Right Funtion?
<td>$<apex:outputText value="{0, Number, Currency}"> <apex:param value="{!target}" /> </apex:outputText></td>
Above line works fine except that I want to get rid of decimals. Negative value should appear like this (1,000) without decimals. Can someone please suggest a better way to achieve this? Can I achieve this using LEFT or Right Funtion?
Thanks Shruti. I tried this but now it shows value like this (-1000). Also, it still shows minus sign and doesnt show commas
You can use the ABS() to get a non-negative value. An <apex:outputText> tag can be used to display the number in a Integer format. Refer this link to know more about <apex:outputText> tag - https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_compref_outputText.htm (https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_compref_outputText.htm" target="_blank)
Please try out the below code -