Alteryx Designer Desktop Discussions

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

Date Format change from Quarter help

Shaydenn
5 - Atom

Hello, I have 2 tables i link to. One has a date column as such 2022-02-22. The second table does not have any date formatted columns. There is a string column called "Period" that reflects as 2022-Q1    2022-Q2    etc.

I need to combine the tables, so i am searching for a way to change Period from 22022-Q2 to date format 2022/2/1 or something of that date type.

Appreciate the help in advance.

3 REPLIES 3
Luke_C
17 - Castor

Can you provide some sample data? Is the period format '2022-Q2' or '22022-Q2'? Your examples seem to show both.

gabrielvilella
14 - Magnetar

Maybe this does what you want:

 

 

IF Contains([FieldName],'Q1')
THEN Left([FieldName],5)+'01-01'
ELSEIF Contains([FieldName],'Q2')
THEN Left([FieldName],5)+'04-01'
ELSEIF Contains([FieldName],'Q3')
THEN Left([FieldName],5)+'07-01'
ELSE Left([FieldName],5)+'10-01'
ENDIF

 

 

Shaydenn
5 - Atom

Thank you Gabrielvilella that is what i needed. And i added the Date Time converter after to get in the right date format.

Labels