euro() Function

Converts a decimal number into a euro value by effectively adding a euro symbol (€), a decimal point, and optional comma for every three digits preceding the decimal.

Syntax

euro( number, [decimals], [no_commas])

number: (Decimal) The number of euros to be returned as text.

decimals: (Integer) The number of digits after the decimal to display.

no_commas (Optional): (Integer) A flag value indicating whether commas are used as number separators. It accepts 0 or 1. The default value is 0.

Returns

Text

Notes

If no arguments are passed, the Euro symbol itself is returned as text.

If no decimals value is passed, the function uses 2 by default.

Examples

euro(3213.43) returns €3,213.43

Open in Github Built: Fri, Nov 04, 2022 (07:10:52 PM)

On This Page

FEEDBACK