HTML Elements Forums Grid Grid – element.exportData() – missing time of dates

This topic contains 2 replies, has 2 voices, and was last updated by Avatar Anonymous 5 months, 3 weeks ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #100304
    Avatar
    Anonymous

    See – https://codepen.io/cetinsert/pen/mdbqRLq?editors=0010

    1. exportData(‘xlsx’) – date fields export as floating point numbers
    2. exportData(‘html’) – date fields export with no time components

    have not checked other formats.

    #100309
    Avatar
    admin
    Keymaster

    Hi cetinsert,

    .xlsx Dates are internally represented as numbers. If you add Format of your Date column in Excel or Google Spreadsheet, you will see that the value is exported correctly. We put a default ‘d’ format in the ver. 4.4.0 for Dates.

    .html Dates export depends on the Grid’s cellsFormat property. The default value is ‘d’ which is (dd/MM/YYYY) during the Grid export, when no format is set. If you want to keep the time component, you will need to set your columns format.

    Regards,
    George

    Smart HTML Elements Team
    https://www.htmlelements.com

    #100311
    Avatar
    Anonymous

    Can you provide an example?

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.