How to create a date without a day field in Alteryx

by Natasha Kurakina

Week 2 started for DS5 and we are already learning Alteryx! On Monday Chris Love was in charge of our training, and we learned a lot. So far I’m really enjoying working with Alteryx, especially the visual workflow feature and easy iterations.

 

 

The second day was full of hands-on, challenging exercises that helped me to explore more of Alteryx’s tools. At the same time not every process is straightforward and obvious (at least on the second day) so I want to share a tip about how to create a date without a day field.

 

Usually, when converting strings to dates, three parts of the date are needed: year, month, day. However, it is not always necessary to have a day field, as illustrated in this example, and it will also help to keep the workflow less complex.

 

The initial dataset came from a text file. Imported text data was split into columns and some data prep was done. Fields containing year and month were left as strings.

 

In the formula tool, a new column “Textdate” was created using the following formula.

 

Then in the DateTime tool, the string is converted into a date format using the custom incoming string format.

 

Alteryx will automatically add “01” as a day to the new converted date filed, so there is no need to add it anywhere explicitly.

 

This was the first tip from the first Alteryx week, so more tips to come!

Avatar

Natasha Kurakina

A Letter to Future Data Schoolers

3 mins read

Wed 24 May 2017

Dashboard Week Day 4 or Visualising the runs

3 mins read

Sun 23 Apr 2017

Dashboard Week Day 3 or How to download multiple files with Alteryx

1 mins read

Thu 20 Apr 2017

Dashboard Week Day 2 or How to combine two header rows

1 mins read

Wed 19 Apr 2017