Data type changes during csv conversions.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
After getting the final file in csv format, the data type of the few columns which are date, automatically changes to string format. Even after using select tool, conversion tool, formula tool to change the data type, the issue still persists. What could be a possible solution to this while converting to csv file?
- Labels:
- Output
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
IF you are looking to convert string to date, look at the datetime tool under Parse or use the formula tool a
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
CSV files do not store any other data type besides string, so you would need to look at outputting to xlsx instead - this is a CSV issue not an Alteryx issue
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I mean not really a csv issue per se -> this is like 'we live on the earth.' It's not a feature/issue. CSV is by definition typeless. Having said that -> what system won't ingest a 'yyyy-mm-dd' directly to date?
to be clear 'yyyy-mm-dd' is the only correct date format. If you open your .csv in Excel and suddenly it becomes an excel format - this is a you issue. open your file in notepad - not Excel and you will you see Excel is performing evil magic to convert your dates into some secondary format.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Haha yes @apathetichell - I'll say "issue" then instead 😂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
My hunch is the poster either
1) has non dates in the workflow and has not converted.
or
2) expects dates to not be in yyyy-mm-dd in the underlying csv
or
3) opened the csv in excel and sees dates in a different format.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Agreed!
