Sorting numeric values goes wrong with thousands seperator

Sorting numeric values goes wrong with thousands seperator

ZefZef Posts: 1Questions: 1Answers: 0

I have a table of 6 columns, the last 2 containing numeric values formatted like this:

<td class="sum number-align-right">{{ sac.sumhoursstu|number_format(2, ',', '.') }}</td>

The thousands seperator is European, for example 23.590,33
The automatic sorting in Datatables is treating this like a string. Setting column type { "type": "num-fmt" } does not work.

The output of the sorted column ASC is like this:

1.003,23
2.500,30
953,90

There are no empty values or string values in the column.

How can I get the sorting right?

Answers

This discussion has been closed.