Problem to convert json date format

Problem to convert json date format

fungus00fungus00 Posts: 5Questions: 2Answers: 0

Hi all,

I’m facing a problem to convert json date format in jquery.

It returns this date format "/Date(1513105200000)/"

Code:

var tbl_Quot = jQuery('#tblQuot').DataTable({
        'ajax': {
            url: '../services/FilterService.asmx/Get_Quotation',
            type: 'POST',
            dataSrc: ''
        },
        language: {
            searchPlaceholder: 'Search Quotation',
            processing: 'Wait busy'
        },
        lengthChange: false,
        columns: [
            {
                'data': null,
                'render': function (data, type, full, meta) {
                    return data.QGDate;
                }
            }
        ]
    });

I'll really appreciate.
Thanks in advance
Regards

This question has an accepted answers - jump to answer

Answers

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

    Hi Fungus!

    The renderer is the right way to go, you just need to format the .NET timestamp with MomentJS.

    Cheers,

    Colin

  • fungus00fungus00 Posts: 5Questions: 2Answers: 0

    Thank you colin.

This discussion has been closed.