Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Date String Calculation

udles5666
8 - Asteroid

Hi Community

 

I have got a csv file as a Data Source and other file is .xlsx. I am trying to join .csv to get a calendar date out of the .xlsx file. 

 

I am getting a string error. Can someone please help me with the work around? Thanks & please see attached for reference. 

5 REPLIES 5
BrandonB
Alteryx
Alteryx

@udles5666 your Fiscal Month in your calendar table is being brought in as a date data type and your Volumetonnes Fiscal Month is coming in as a string from the CSV file. The join tool is expecting the fields that you are joining to be the same data type. Therefore, you can add a select tool after your calendar table and change the data type to V_WString. Alternatively, you could use a DateTime tool and convert the volumetonnes Fiscal Month field into a date data type.

 

date string.png

grazitti_sapna
17 - Castor

Hi @udles5666 , please try attaching the workflow as yxzp file as the source files throws an error.

the calender table.xlsx file has the field fiscal month which is date type try converting it to V_String using select tool, there is a possibility that the field may get blank after this conversion if it does then try using date time tool to convert it into string format.

I hope it helps, if the issue still persists kindly attach the source files along.
Thanks.

grazitti_sapna_0-1597639050313.png

 

Sapna Gupta
udles5666
8 - Asteroid

Hi Sapna,

Apologies keep on grabbing the wrong file from the folder.

I tried what you advised but didn't work. Can you please have a look again? Thanks.

BrandonB
Alteryx
Alteryx

This is because you are attempting to join two things in different formats. You will want to use a formula tool with the DateTimeParse function as shown below to create an actual date from the Fiscal Month that is listed. Here are the date time functions for reference: https://help.alteryx.com/10.1/Reference/DateTimeFunctions.htm

 

date format.png

 

Once you do this, you will see that you can join on data in the same format:

 

Joined.png

grazitti_sapna
17 - Castor

Hi @udles5666 , try this you need to convert the fiscal month in the first file into a yyyy-mm-dd format then it will work.Please refer to the screenshot and workflow.

Thanks.

 

grazitti_sapna_0-1597647094986.png

 

Sapna Gupta
Labels