1

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:

  • €400,-
  • €4,99
  • €1.000,23
  • €23.384,-
Barbaros Özhan
  • 59,113
  • 10
  • 31
  • 55
botenvouwer
  • 4,334
  • 9
  • 46
  • 75
  • Just to explain: the `$` symbol in a format model is part of Oracle's number format syntax, it is not related to any particular currency. – Jeffrey Kemp Oct 15 '15 at 08:14

2 Answers2

3

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.

Community
  • 1
  • 1
Peter Alexeev
  • 218
  • 2
  • 6
  • `to_char(MAANDLAST,'L99G999D99MI', 'NLS_NUMERIC_CHARACTERS = '',.'' NLS_CURRENCY = ''€'' ')` this works thanks for doc link – botenvouwer Oct 14 '15 at 19:57
0

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.

Jeffrey Kemp
  • 59,135
  • 14
  • 106
  • 158