Hello,
Does anyone have any documentation on how to correctly format the "FormatCurrency (<Amount>,<Currency>) " function?
I've tried to use it and get errors. My Amount is a "Double-precision-number" and I don't know what to use for currency; I've tried USD to no avail.
Please advise.
Solved! Go to Solution.
Views
Replies
Total Likes
You can definitely go ahead and open a ticket but let me elaborate more on how this works.
It expects the ISO currency code as the parameter (e.g., ‘USD,’ ‘EUR’), but there is no documentation around it.
I tried on Postgres (strings, doubles, etc., for both <amount> and <currency> )
funcList.xml only shows a definition for SQL Server.
In fact, because of the current limitations, we should have the "FormatCurrency" function removed/deprecated in the future.
The function seems to be related to SQL Server only.
It has not been modified for a long time, and we have no automatic testing.
Views
Replies
Total Likes
Akshaaga,
So, this function doesn't work in the Enrichment step? Should I open a Support Ticket?
My ultimate goal is this. To convert a number: 1,207.00 so it displays as $1,207.00.
Using the functions in Adobe, always removes the comma-separator.
Views
Replies
Total Likes
You can definitely go ahead and open a ticket but let me elaborate more on how this works.
It expects the ISO currency code as the parameter (e.g., ‘USD,’ ‘EUR’), but there is no documentation around it.
I tried on Postgres (strings, doubles, etc., for both <amount> and <currency> )
funcList.xml only shows a definition for SQL Server.
In fact, because of the current limitations, we should have the "FormatCurrency" function removed/deprecated in the future.
Hi @montezh2001 ,
True, as mentioned by @akshaaga the FormatCurrency () function is currently not supported for Postgres (Adobe-managed environments).
As you mentioned your purpose is to make the currency display with your floating number column then here you can try to use an old school trick, convert your Floating number to Integer first using the Floor() or Round() function and then wrap this in ToString() function to convert it in String and then concat it with '$' symbol.
example: in Enrichment activity, suppose your column name is @floatingNumber then use
'$' + toString(Floor(@floatingNumber));
Br,
Shubham
Views
Replies
Total Likes
Thank you. This would work if the client didn't want to include the ',' as part of the amount. Example $1,207.00 is how they want it to be formtted. I even tried to call in a Javascript function Intl.NumberFormat(), but that does not work in Adobe.
So I think I will need to go about the long route of trying to code the comma into the amount.
Views
Replies
Total Likes
Yes, @montezh2001 it's sad to not have these functions working in Adobe campaign, so concatenation of strings seems to be the only possible way for now.
Br,
Shubham
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies