Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
johnwards opened this issue Oct 21, 2024 · 1 comment
Open

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

johnwards opened this issue Oct 21, 2024 · 1 comment

Comments

@johnwards
Copy link

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@johnwards and others