Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

155
Visualizações
I'm having trouble with data in Datetime2 format while parsing data in array with Ajax

I want to select a row data group in the table based on the id coming to the upNews() method. Then I want to show some column values (like Id, Name, Date) on the alert screen after I split the data in the selected row. I am having trouble retrieving and/or parsing Datetime2 format data contained in the array. How can I run this with Ajax?

var selectedValue;

function upNews(pid) {
    var table = $('#kt_datatable').DataTable();
    selectedValue = table.data().filter(x => x.Id == pid)[0];
    $('#idd').val(selectedValue.Id);

    $('#nm').val(selectedValue.Name);

    /* I'm having trouble using the substring() method. */
    $('#dt').val(selectedValue.Date.text.substring(0,10));

    alert(selectedValue.Date);
about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda