Start Free Trial

Alteryx Designer Desktop Discussions

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

GET the date from multiple columns

Ultralightbeam
8 - Asteroid

 

Column1Column2Columne3Output
[Null]31Dec202331Dec20
31Mar202032LoremIpsum31Mar20

 

Hello, I have 3 columns and output is going to get the date between three columns, however the date format between all three columns are different some have (%d%b%y) and some have (%d%b%Y). Just different in year some have 2020 and some have only 20.

16 REPLIES 16
Emil_Kos
17 - Castor
17 - Castor

Hi @Ultralightbeam,

 

I have prepared a workflow for you.

First, we create proper date formula using:

 

DateTimeParse([Column1],"%d%b%Y")

 

After we got 3 date columns I am using the max function to pick the correct date.

 

Emil_Kos_0-1610446129804.png

 

 

The output. You need to clean it but it will help you understand how this was achieved. 

 

Emil_Kos_1-1610446139906.png

 

Ultralightbeam
8 - Asteroid

Hi, thanks for your help however, I still need to retain the formatting of date if it is 2020 or 20 as you can see on row 2 it was 31Mar2020 and should still be 31Mar2020 and not 31Mar20

Emil_Kos
17 - Castor
17 - Castor

Hi @Ultralightbeam,

 

The only issue with it will not be a real date format. In order to achieve this output, it needs to be a string.

 

Please find the workflow attached. 

Qiu
21 - Polaris
21 - Polaris

@Ultralightbeam 
Maybe this is what you need.

0112-Ultralightbeam.PNG

 

Ultralightbeam
8 - Asteroid

yeah it still needs to be in string since I will be concatenating this further with another string. I think the output is still the same. I am thinking of using if statement to determine if column meets the specific format or not.

Ultralightbeam
8 - Asteroid

@Qiu the output should not be transformed. It still should be 31Mar2020

Emil_Kos
17 - Castor
17 - Castor

Hi @Ultralightbeam,

 

The last column in my workflow should work for you:

 

Emil_Kos_0-1610452390405.png

 

 

 

Qiu
21 - Polaris
21 - Polaris

@Ultralightbeam 
It was transformed in your sample data.

We can just simply remove the last formula tool.

Qiu_0-1610452834654.png

 

Ultralightbeam
8 - Asteroid

@Qiu ,

 

Its working but filter is not working at some point

Ultralightbeam_0-1610453868106.png

I have same format but it wen to true, I don't know why this specific date went to false

Labels
Top Solution Authors