Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

259
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!