How to get datatables to export datetime format excel understands?

How to get datatables to export datetime format excel understands?

bohoirupbohoirup Posts: 6Questions: 2Answers: 0

We have a lot of datetimes in our datatables formatted like this: yyyy-MM-dd HH:mm:ss (2021-03-25 09:30:25)

When we export to Excel these datetimes are not recognized as valid datetimes in Excel, but if we just copy/paste the date into Excel it works just fine.

If I remove the time-part of the date and export from Datatables, Excel recognizes the date just fine (2021-03-25), but as soon as the time is there it fails.

Is there some configuration that needs to be done to get this working or ?

Hope somebody can help :smile:

Best regards
Bo

Answers

  • colincolin Posts: 15,143Questions: 1Answers: 2,586

    We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.

    Cheers,

    Colin

This discussion has been closed.