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

261
Visualizações
How to format date and time in datatables table

I have a frontend app and I have a column with date and time and I would like to format it. The npm module used for the table is datatables.net-dt

Here is the code:

$(document).ready(function() {
               var table = $('#example').DataTable({
                    responsive:true,
                    data:res.mesaje,
                    buttons:true,
                    destroy:true,
                    columns: [
                        
                        {data:'datetime'},
                       
                        {defaultContent:'<button id="buton123">Download</button>'}
                        
                    ]
                })

I tried with moment.js using the function of moment formatting after {data:moment...etc.. but it shows nothing in the date time column. The datetime format that i get from the API is 202011100707 and I would like to format it to 2020/11/11 10:10 something like that. Please help

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