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

Problems with date, datetime formats #594

Open
cristinaclaverol opened this issue Oct 10, 2024 · 5 comments
Open

Problems with date, datetime formats #594

cristinaclaverol opened this issue Oct 10, 2024 · 5 comments
Assignees

Comments

@cristinaclaverol
Copy link

ODE reads date formats like 4/1/2022 as a string even though the date format of that cells is assigned by datatime in the Excel. When you modify it in the metadata it detects an error because it does not recognize the data as a date.

@romicolman
Copy link
Collaborator

Hi @cristinaclaverol can you please share an extract of the file you ingested so we can run the tests?

@romicolman romicolman moved this to Backlog in ODE: Stable Release Oct 11, 2024
@romicolman romicolman self-assigned this Oct 16, 2024
@romicolman romicolman moved this from Backlog to On hold in ODE: Stable Release Oct 21, 2024
@romicolman
Copy link
Collaborator

Here is the file that @cristinaclaverol dades_test_02 - Hojas de c√°lculo de Google.csv
to the app.

Steps that I followed:

  • I opened the file on the ODE, went to the Metadata panel and I checked the Data comanda column. This column is formatted as STRING, according to the ODE:

Image

  • I then opened the file on Excel and checked that the column is formatted as Date:

Image

I also checked the file on Numbers (Mac software for tabular data). I see that the column is also formatted as date.

Any idea of why the ODE is taking that column as STRING?

@romicolman romicolman assigned pdelboca and unassigned romicolman Oct 21, 2024
@romicolman romicolman moved this from On hold to Backlog in ODE: Stable Release Oct 21, 2024
@pdelboca
Copy link
Member

pdelboca commented Oct 30, 2024

@romicolman I think this is a question related to frictionless-py since we are using it to read the data and the schema. I would venture to answer that ODE is loading the column as a string because the date is not in ISO8601 format (YYYY-MM-DD).

A common data friction is that dates are usually written in different formats like YYYY/MM/DD or DD/MM/YY or MM/DD/YY or even YYYY-MM-DD (notice that I changed / for -). According to the Table Schema of the Data Package dates needs to be in YYYY-MM-DD format. Since this data is DD/MM/YY then it is considered as a string.

This is not an error nor a problem with the tool but rather a data friction that we need to solve/explain.

The specification of Data Package has a definition on what a date should look like, so in order to be able to define it as a date in Open Data Editor (that it is based in Data Package) the user should change the values to respect the format of the specification (YYYY-MM-DD).

@cristinaclaverol
Copy link
Author

cristinaclaverol commented Oct 30, 2024 via email

@loleg
Copy link
Contributor

loleg commented Oct 31, 2024

Huge opportunity to do the community a service in this area. I even suggested to call the project the "Open Date Editor" .. it's such a common issue that even if we just do this right we will save the day for many people.

Technically, the moment.js library is one among many excellent technical projects specializing in this, and we should consider "strongly" adopting them - not just implementing the library, but also having a conversation with their community etc.

@romicolman romicolman moved this from Backlog to In Progress in ODE: Stable Release Nov 4, 2024
@roll roll moved this from In Progress to Backlog in ODE: Stable Release Nov 5, 2024
@romicolman romicolman moved this from Backlog to In Progress in ODE: Stable Release Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: In Progress
Development

No branches or pull requests

5 participants