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

CSV: Added option to parse date/time as extended ISO 8601 #954

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Jofkos
Copy link
Contributor

@Jofkos Jofkos commented Mar 16, 2024

When working with data from different sources, one may encounter a various number of different date formats.

Examples include:

  • yyyy-MM-dd hh:mm:ss
  • yyyy-MM-dd hh:mm:ss.zzz
  • yyyy-MM-dd hh:mm:ss.zzzzzz (not even supported with format strings)
  • yyyy/MM/dd hh:mm:ss
  • yyyy/MM/dd hh:mm:ss.zzz
  • yyyy/MM/dd hh:mm:ss.zzzzzz (not even supported with format strings)

These are all supported by Qt's Qt::ISODateWithMs, which thus allows for instantly loading different csv's without having to adjust the date format every time. This pull request adds a user-selectable UI option to parse dates as ISO8601.

The new UI suggested for that looks like this:

New 'parse CSV' UI, with radio button ISO 8601 unchecked New 'parse CSV' UI, with radio button ISO 8601 checked

ISO 8601 parsing is highly flexible. This allows to load data of different origin using different date formats subsequently, without having to adjust the date format string every time when switching back and forth.
@Jofkos Jofkos force-pushed the iso-date-parsing branch 2 times, most recently from 39b741f to d1c10a7 Compare March 31, 2024 14:11
@Jofkos Jofkos marked this pull request as draft March 31, 2024 16:31
@Jofkos Jofkos marked this pull request as ready for review March 31, 2024 16:32
@Jofkos Jofkos changed the title CSV: Allowing to parse date as extended ISO 8601 CSV: Added option to parse date/time as extended ISO 8601 Apr 1, 2024
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

Successfully merging this pull request may close these issues.

1 participant