Skip to main content
Conga Support

How to format currency

You can use the following formula to convert variables into currency within your documents or templates:

{{ number_to_currency(variablename) }}

Note that your variable name must be lowercased; it also must begin and end with {{ }}.

For example, you might use the following:

Second_Number = 1000.32

Input: {{ number_to_currency(second_number) }}

Return: $1,000.32

Note: This defaults to $ as the unit and a comma as the delimiter.

You can change a unit by using unit: “X”

Input: {{ number_to_currency(second_number, :unit=>”&pound” )}}

Return: £1,000.32

You can change delimiters by using delimiter: “X”

Input: {{ number_to_currency(second_number, :delimiter=>”.”) }}

Return: $1.000.32

Combine unit and delimiter changes like this:

Input: {{ number_to_currency(second_number, :delimiter=>’,’, :unit=>’¢’ ) }}

Return: ¢1,000.32

You can add precision as well:

Input: {{ number_to_currency(second_number, :precision=>3) }}

Return: $1,000.324

  • Was this article helpful?