Skip to content

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 force-pushed the iso-date-parsing branch from d1c10a7 to bb46375 Compare March 31, 2024 14:13
@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
@facontidavide facontidavide self-assigned this Apr 29, 2025
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.

2 participants