NumberFormat example
From PN
| Wiki text | Result | Explanation |
|---|---|---|
| {{#number_format:12345678.055555}} | 12,345,678 | Default behaviour: Round to whole number, insert ',' thousands separators |
| {{#number_format:12345678.055555|2}} | 12,345,678.06 | Round to two decimal places (useful for monetary amounts) |
| {{#number_format:12345678.055555|2|,|.}} | 12.345.678,06 | Round to two decimal places, use '.' as thousands separators and ',' as decimal point |
| {{#number_format:12345678.055555|2|,|_}} | 12 345 678,06 | Round to two decimal places, use a space as thousands separators and ',' as decimal point |
| {{#number_format:1.2345678055555e7|4}} | 12,345,678.0556 | Scientific notation is also accepted - here rounded to four decimal places |
| {{#number_format:12,345,678.055555}} | First argument to number_format must be a number | The original number must be a plain number, without thousands separators etc. |