# "%.#f".format function return value with "comma" separator, I need it with "dot" separator

**URL:** <https://discuss.kotlinlang.org/t/f-format-function-return-value-with-comma-separator-i-need-it-with-dot-separator/5516>\
**Category:** Android\
**Created:** [November 21, 2017, 8:11pm UTC](https://discuss.kotlinlang.org/t/f-format-function-return-value-with-comma-separator-i-need-it-with-dot-separator/5516 "2017-11-21T20:11:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![diegohdez90](https://avatars.discourse-cdn.com/v4/letter/d/71c47a/32.png) [@diegohdez90](https://discuss.kotlinlang.org/u/diegohdez90)\
**Post date:** [November 21, 2017, 8:11pm UTC](https://discuss.kotlinlang.org/t/f-format-function-return-value-with-comma-separator-i-need-it-with-dot-separator/5516/1 "2017-11-21T20:11:03Z")

</div>

Hi Kotlin community.

I am using “%.#”.format(number) to use only # decimal numbers to avoid display all decimal values, but this function returns with “comma” separator and I need this values with “dot” separator.

I have to use another function or I have to use a dependency to get the result.

Thanks

---

<div class="post-metadata">

**Author:** ![jstuyts](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/jstuyts/32/2141_2.png) [@jstuyts](https://discuss.kotlinlang.org/u/jstuyts)\
**Post date:** [November 21, 2017, 8:17pm UTC](https://discuss.kotlinlang.org/t/f-format-function-return-value-with-comma-separator-i-need-it-with-dot-separator/5516/2 "2017-11-21T20:17:37Z")

</div>

You probably want one of the overloads with a `Locale` parameter: [format](http://kotlinlang.org/api/latest/jvm/stdlib/kotlin.text/format.html)

Use `Locale.ENGLISH` or `Locale.ROOT`.

---

<div class="post-metadata">

**Author:** ![diegohdez90](https://avatars.discourse-cdn.com/v4/letter/d/71c47a/32.png) [@diegohdez90](https://discuss.kotlinlang.org/u/diegohdez90)\
**Post date:** [November 21, 2017, 8:27pm UTC](https://discuss.kotlinlang.org/t/f-format-function-return-value-with-comma-separator-i-need-it-with-dot-separator/5516/3 "2017-11-21T20:27:25Z")

</div>

Thanks @jstuyts. This resource help me in the issue.

Have a good day

Keep coding.
