Question: I am using AMPScript to insert values into salesforce custom object. Inserting String values is working fine but for salesforce data type Currency(16,2) I am getting error. I have tried FormatCurrency function without any luck.

```
%%[

var @p_cost , @insertthis

set @p_cost = [product cost]
set @p_cost =  FormatCurrency(@p_cost,"en_GB", 2) 

set @insertthis = CreateSalesforceObject("myObject__c", 1, "p_cost__c", @p_cost)

]%%

```

Anybody have any idea?

Kind Regards,

Answer: 
As my original data coming from salesforce itself as Currency and saved in marketing cloud as decimal. 

I have used FormatNumber function to convert to number and it saved back to Salesforce object perfectly.

```
set @p_cost = FormatNumber(@p_cost,"N2")

```

Thanks all those who helped to solve this issue.
Maybe format function may meet your requirements
%%=Format("$100.00","$#,#.00;-$#,#.00")=%% 

you can find more details on formats on below link <http://help.exacttarget.com/en/documentation/exacttarget/content/ampscript/ampscript_syntax_guide/utilities_ampscript_functions/#Format> Hope this helps