botenvouwer
botenvouwer

Reputation: 4432

show currency in APEX in euro's

In Oracle's apex you can do to_char( moneycolumn, '$9,999.99').

But when I do to_char( moneycolumn, '€9.999,99')

I get: ORA-01481: invalid number format model

So how can I convert float values to euro format like:

Upvotes: 1

Views: 2907

Answers (2)

Peter Alexeev
Peter Alexeev

Reputation: 218

This might help.

You may supply currency as part of NLSPARAM - 3rd optional argument of to_char function - see the doc. Or you may alter NLS_TERRITORY setting with ALTER SESSION command. Or maybe the to_char(500,'L999G999D00') will even work out of the box depending on your database value for NLS_TERRITORY.

Upvotes: 3

Jeffrey Kemp
Jeffrey Kemp

Reputation: 60292

Just for completeness - to include arbitrary characters in a number format, you can delimit them with double quotes, e.g. to_char( moneycolumn, '"€"9.999,99') - however in this case since you just want to use a different symbol for the currency I'd recommend using the accepted answer from Peter.

Upvotes: 0

Related Questions