Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using Euros with numberformat

Status
Not open for further replies.

tina2

IS-IT--Management
Joined
May 1, 2001
Messages
169
Location
US
I need to display some financial information in Euros.
I have been using
#numberformat(qGetLimits.PermittedLimit,"$___,___,___.")#
to display in dollars without the cents, which works beautifully. Can anybody tell me hoiw to get the same results using (€ €)??

(Cold Fusion balks at the symbol when I replace the $ with it)

Thanks!

Kristine
 
LSEuroCurrencyFormat
Returns a currency value using the convention of the locale and the Euro as the currency symbol. Default value is "local."

Note The locale is set with the SetLocale function.



See, also, LSParseEuroCurrency, LSCurrencyFormat, and SetLocale.

Syntax
LSEuroCurrencyFormat(currency-number [, type ])

currency-number
The currency value.

type
Currency type. Valid arguments are:

none -- (For example, 10.00)
local -- (Default. For example, 10.00 €)
international -- (For example, EUR10.00)
Usage
The LSEuroCurrencyFormat function can display the Euro symbol (€) only on Euro-enabled computers, such as Windows NT 4.0 SP4, that have Euro-enabled fonts installed.

This function is similar to LSCurrencyFormat except that LSEuroCurrencyFormat displays the Euro currency symbol (€) or the international Euro sign (EUR) if you specify the type as local or international, respectively, and the Euro is the accepted currency of the locale.

Currency output
The following table shows sample currency output for some of the locales supported by ColdFusion in each of the format types: local, international, and none.

Currency Output by Locale
Locale Format Type Output
Dutch (Belgian) Local: 100.000,00 €
International: EUR100.000,00
None: 100.000,00


Dutch (Standard) Local: € 100.000,00
International: EUR100.000,00
None: 100.000,00


English (Australian) Local: €100,000.00
International: EUR100,000.00
None: 100,000.00


English (Canadian) Local: €100,000.00
International: EUR100,000.00
None: 100,000.00


English (New Zealand) Local: €100,000.00
International: EUR100,000.00
None: 100,000.00


English (UK) Local: €100,000.00
International: EUR100,000.00
None: 100,000.00


English (US) Local: €100,000.00
International: EUR100,000.00
None: 100,000.00


French (Belgian) Local: 100.000,00 €
International: EUR100.000,00
None: 100.000,00


French (Canadian) Local: 100 000,00 €
International: EUR100 000,00
None: 100 000,00


French (Standard) Local: 100 000,00 €
International: EUR100 000,00
None: 100 000,00


French (Swiss) Local: € 100'000.00
International: EUR100'000.00
None: 100'000.00


German (Austrian) Local: € 100.000,00
International: EUR100.000,00
None: 100.000,00


German (Standard) Local: 100.000,00 €
International: EUR100.000,00
None: 100.000,00


German (Swiss) Local: € 100'000.00
International: EUR100'000.00
None: 100'000.00


Italian (Standard) Local: € 10.000.000
International: EUR10.000.000
None: 10.000.000


Italian (Swiss) Local: € 100'000.00
International: EUR100'000.00
None: 100'000.00


Norwegian (Bokmal) Local: € 100 000,00
International: EUR100 000,00
None: 100 000,00


Norwegian (Nynorsk) Local: € 100 000,00
International: EUR100 000,00
None: 100 000,00


Portuguese (Brazilian) Local: €100.000,00
International: EUR100.000,00
None: 100.000,00


Portuguese (Standard) Local: €100.000,00
International: EUR100.000,00
None: 100.000,00


Spanish (Mexican) Local: €100,000.00
International: EUR100,000.00
None: 100,000.00


Spanish (Modern) Local: 10.000.000 €
International: EUR10.000.000
None: 10.000.000


Spanish (Standard) Local: 10.000.000 €
International: EUR10.000.000
None: 10.000.000


Swedish Local: 100.000,00 €
International: EUR100.000,00
None: 100.000,00




Example
<!--- This shows LSEuroCurrencyFormat --->
<HTML>
<HEAD>
<TITLE>LSEuroCurrencyFormat Example</TITLE>
</HEAD>

<BODY>
<H3>LSEuroCurrencyFormat Example</H3>

<P>LSEuroCurrencyFormat returns a currency value using
the locale convention. Default value is &quot;local.&quot;

<!--- loop through a list of possible locales and
show currency values for 100,000 units --->
<CFLOOP LIST=&quot;#Server.Coldfusion.SupportedLocales#&quot;
INDEX=&quot;locale&quot; DELIMITERS=&quot;,&quot;>
<CFSET oldlocale = SetLocale(locale)>

<CFOUTPUT><P><B><I>#locale#</I></B><BR>
Local: #LSEuroCurrencyFormat(100000, &quot;local&quot;)#<BR>
International: #LSEuroCurrencyFormat(100000,
&quot;international&quot;)#<BR>
None: #LSEuroCurrencyFormat(100000, &quot;none&quot;)#<BR>
<Hr noshade>
</CFOUTPUT>

</CFLOOP>

</BODY>
</HTML>
Sylvano
dsylvano@hotmail.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top