• Hello,

    Pretty simple question but I have not been able to get the answer to. How can I drop zeros from numbers such as 2,857.50 to 2,857.5

    I have been using the formula:
    “columnDefs”: [ { “orderSequence”: [ “desc”, “asc” ], “targets”: [ 1, 2, 3, 4 ] } ]

    however this will not insert commas: 2857.5

    Ill then try this:
    “columnDefs”: [ { “targets”: [ 1, 2, 3, 4 ], “render”: $.fn.dataTable.render.number( ‘,’, ‘.’, 2, ” ) } ]

    This will keep the comma but not drop off the zero.

    Any help would be much appreciated!

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Drop zeros from tables’ is closed to new replies.