Formatting numbers Last updated: 27. May 2025

Information about formatting numbers with the Docly format function.

Important! To set correct language first use the docly.SetCulture function:
https://developers.docly.net/JavaScript/Output-functions/SetCulture

To format a date use the docly.format function:
https://developers.docly.net/JavaScript/Output-functions/Format

#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, "##,######")# Thousands separator 1,054.32
#docly.format(fieldname, "##,######\,\-")# Thousands separator with trailing ,- 1,054.32,-