faigy langsam
faigy langsam

Reputation: 2176

Format a number with decimal mark

How do I format a number like this:
95263.51

to be with decimal mark (comma):
95.263,51

or even with decimal point (which is more common):
95,263.51 ?

Upvotes: 6

Views: 2113

Answers (1)

faigy langsam
faigy langsam

Reputation: 2176

Found the way to do it,
using the Number package:
iex> Number.Delimit.number_to_delimited(98765432.98, delimiter: ".",separator: ",") "98 765 432,98"

Upvotes: 6

Related Questions