ToPrice method (number)

Returns this number as a price.

Syntax

number.ToPrice

Returns the text representation of this number as a price.

Example

{% Var price1 = 3 %}
{% Var price2 = 1.99 %}

Answers: {{ price1.ToPrice }}, {{ price2.ToPrice }}.

The above example would output: Answers: £3.00, £1.99. (for the 'en-GB' culture).

Remarks

The currency symbol, thousandths separator, decimal separator and number of decimal places are based on the current culture.

This method returns the same result as number.ToText('C').