Formatting numbers
Information about formatting numbers with the Docly format function.
Important! To format for the right language, first set the culture with docly.setCulture.
Format a number with the docly.format function:
#docly.format(123456, "N")# If you want to add additional symbols before or after the integer and the decimal you can use the \ character before quoting the symbol you want to merge in .
Examples are:
More examples
Format | Description | Examples |
|---|---|---|
#docly.format(fieldname, "0,-")# | To display numbers as typical prices without decimals | 100,- |
#docly.format(fieldname, "\k\r. 0.00")# | Will display numbers with 2 decimals and kr. front. | kr. 100,50 |
#docly.format(fieldname, "#,##0.######")# | Thousands separator | 1,054.32 |
#docly.format(fieldname, "#,##0.######,-")# | Thousands separator with trailing ,- | 1,054.32,- |