Skip to content

Excel date import issues, dates being turned into numbers #243

@johnwards

Description

@johnwards

Hey, so when we use this library to import columns that are formated as Dates via Excel in the preview and in the data we get out after import the dates are now numbers.

I had a quick chat with chatgpt and it says:
In Excel, dates are stored as numbers internally, where the number represents the number of days since January 1, 1900. The value 45581 corresponds to October 16, 2024.

I'd have expected the library to handle this especially if we set the data_type to be a date, but it doesn't seem to do that, nor can I find any code using the types.

We're going to put something in our server code to convert it back to a Date, but the UI preview issue is still there which isn't great.

My suggestion to fix:

  1. If the field is date type
  2. If value is numeric, convert to date
  3. Have the ability to pass in the format you want the date type in. eg The world majority format DD/MM/YYYY or American MM/DD/YYYY etc

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions