A non well formed numeric value encountered

A non well formed numeric value encountered

haidir32haidir32 Posts: 2Questions: 1Answers: 0

I try to load data from url using datatable with custom http parameters.
origin url like = > localhost/api/data/datatables?start=2019-12-17T09:49:04&end=2019-12-17T10:04:04

table = $('#datatable').DataTable({
        processing: true,
        serverSide: true,
        ajax: {
            url : '/api/data/datatables',
            data : {
                start : '2019-12-17T09:27:35', 
                end: '2019-12-17T10:27:35'
            }
        },
        autoWidth: false,
        order: [[ 0, "desc" ]],
        columns: [
            { data: 'timestamp', name: 'timestamp'},
            { data: 'data', orderable: false},
        ]
    });
    $.fn.DataTable.ext.errMode = function ( settings, helpPage, message ) { 
        console.log(message);
    };

result :

DataTables warning: table id=datatable - Exception Message:

A non well formed numeric value encountered

how can i fix it?

Answers

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    This SO thread suggests it'll be a problem in your PHP script. Hopefully that will sort you out,

    Colin

  • haidir32haidir32 Posts: 2Questions: 1Answers: 0

    @colin
    thank you for your answer. The error no longer appears, but the data record does not appear in the table when "serverside" = true,

  • kthorngrenkthorngren Posts: 21,468Questions: 26Answers: 4,977

    The place to start is to look at the Ajax response in the browser's Developer Tools. Steps can be found in this technote. Let us know what you find.

    If you still have difficulties finding the issue please post a link to your page or a test case replicating the issue. This will allow for help in debugging. If you can't do that then use the Debugger to grab debug info for the developers to look at.

    Kevin

This discussion has been closed.