# Formatting numbers (decimal separator)

**URL:** <https://community.silverfin.com/t/formatting-numbers-decimal-separator/1799>\
**Category:** Templates\
**Created:** [May 26, 2020, 1:19pm UTC](https://community.silverfin.com/t/formatting-numbers-decimal-separator/1799 "2020-05-26T13:19:59Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Warde](https://avatars.discourse-cdn.com/v4/letter/w/5f9b8f/32.png) [@Warde](https://community.silverfin.com/u/Warde)\
**Post date:** [May 26, 2020, 1:20pm UTC](https://community.silverfin.com/t/formatting-numbers-decimal-separator/1799/1 "2020-05-26T13:20:00Z")

</div>

The standard format for the decimal separator in a number appears to be a dot (33612.13). Is it maybe possible to format a number to show it with a comma as a decimal separator (33612,13)?

Ward

---

<div class="post-metadata">

**Author:** ![Wouter\_Bruynsteen](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.silverfin.com/wouter_bruynsteen/32/1196_2.png) [@Wouter\_Bruynsteen](https://community.silverfin.com/u/Wouter_Bruynsteen)\
**Post date:** [May 26, 2020, 2:18pm UTC](https://community.silverfin.com/t/formatting-numbers-decimal-separator/1799/2 "2020-05-26T14:18:45Z")

</div>

Hi Warde

You can use the currency filter ([https://developer.silverfin.com/docs/number-filters#currency](https://developer.silverfin.com/docs/number-filters#currency)) to format numbers, then the decimal separator will be set to what is standard in that language. So if your language in Silverfin is Dutch, French or Danish, then it’ll use a comma as a decimal separator.

Kind regards  
Wouter

---

<div class="post-metadata">

**Author:** ![Warde](https://avatars.discourse-cdn.com/v4/letter/w/5f9b8f/32.png) [@Warde](https://community.silverfin.com/u/Warde)\
**Post date:** [May 26, 2020, 2:47pm UTC](https://community.silverfin.com/t/formatting-numbers-decimal-separator/1799/3 "2020-05-26T14:47:59Z")

</div>

Ok, tx, I do know about that Wouter, but the problem is that I really want “33612,13” as a number, and with the currency format, I get “33.612,13”.

---

<div class="post-metadata">

**Author:** ![Wouter\_Bruynsteen](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.silverfin.com/wouter_bruynsteen/32/1196_2.png) [@Wouter\_Bruynsteen](https://community.silverfin.com/u/Wouter_Bruynsteen)\
**Post date:** [May 26, 2020, 3:11pm UTC](https://community.silverfin.com/t/formatting-numbers-decimal-separator/1799/4 "2020-05-26T15:11:40Z")

</div>

Ok, then you should be able to achieve this by using the replace filter, for example:

```
{{ 5*5.25 | replace:".","," }}

```

will then output 26,25

However, do bear in mind that this will convert your number into a string, so I would only do the replace on the end of the calculation or when you’re printing the value. Calculating further with the number after the replace will have a chance of giving you incorrect results.

Kind regards  
Wouter

---

<div class="post-metadata">

**Author:** ![Warde](https://avatars.discourse-cdn.com/v4/letter/w/5f9b8f/32.png) [@Warde](https://community.silverfin.com/u/Warde)\
**Post date:** [May 26, 2020, 3:22pm UTC](https://community.silverfin.com/t/formatting-numbers-decimal-separator/1799/5 "2020-05-26T15:22:44Z")

</div>

Ok, great, tx, this might do the job. The numbers need this format to be uploaded in another program, but not sure if a string will be recognised… Let’s try.
