Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

CSV Data Converting to Date

sslattery17
8 - Asteroid

I have a CSV file with different types of data; Unit # Resident Name, and Lease Dates.  The Unit # is converting from # to Date and I can't seem to resolve it.  I converted my excels to CSV; that did not work.  Not all unit #s are converting to a month and/or month and day.  The results window shows the data correctly; but the output file is displaying the below.  Jun-35 should read 6-35 etc

 

Unit # Primary Name Lease Begin Date
Jun-35 Shaina Olds Seymour 9/11/2024
Jun-36 Eric Callen 5/15/2024
Nov-37 Mary Thomas 7/1/2024
Nov-38 Kimberly Rossetti 12/21/2023
Nov-46 Tasha Luke 2/29/2024
Nov-47 Rick Charroud 7/14/2024
Nov-48 Ben Kaboyi 10/1/2024
15-49 Maria Ellis 9/1/2024
15-50 Bassel Bittar 9/27/2024
15-51 Richard Roark 12/15/2023

4 REPLIES 4
Yoshiro_Fujimori
15 - Aurora

Hi @sslattery17 

I guess the conversion occurs at Excel , not at Alteryx.

If this is the case, you may want to try this tips:

https://support.microsoft.com/en-us/office/stop-automatically-changing-numbers-to-dates-452bd2db-cc9....

 

I hope it helps.

 

 

sslattery17
8 - Asteroid

@Yoshiro_Fujimori Thank you. 

 

We receive a lot of excel or csv files from clients, I would say over a 2000 a month.  In excel this is simple by converting the column to text; but I have not found a way to do this in Alteryx.  Once I complete my workflows; I load them in a system to analyze the data; if I add an ' before as one of the recommendations; I then have to open all the output files to remove the ' before loading them.  That is 2 different times I have to touch the spreadsheet before processing my workflow.

 

Could I do this after the data is brought into Alteryx?  

Yoshiro_Fujimori
15 - Aurora

If the format after automatic conversion by Excel is limited to a few patterns,

you may find a solution in Weekly Challenge #4 Date Parsing.

Yoshiro_Fujimori
15 - Aurora

Just as a sample, if your expected values are as below;

 

InputExpected
Jun-3506-35
Jun-3606-36
Nov-3711-37
Nov-3811-38
Nov-4611-46
Nov-4711-47
Nov-4811-48

 

You can convert it with Date Time functions as below:

 

Workflow

workflow.png

Expression

Expected = 

If IsInteger([1]) THEN [1] 

ELSE DateTimeFormat(DateTimeParse([1],"%b"),"%m") 

ENDIF 

+ "-" + [2]

Labels
Top Solution Authors