Alteryx Designer Desktop Discussions

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

Date format query

griseldagomes
7 - Meteor

Hello Experts!

 

I have 2 queries in regards to altering the date format in alteryx.

1) The dates are currently appearing in format yyyymmdd in field 'Date' (see input column) which needs to be converted to 'Date' (see output column) in format ddmmyyyy. This field is currently reflecting as 'v_string' type. refer to grid 1

2) In 'Start' and 'End' columns, where the value 'nil' exists, no change is required, however for the rest of the values, they need to be converted from yyyymmdd to ddmmyyyy. This field is currently reflecting as 'v_string' type. refer to grid 2

Would appreciate any help with this please.

Thanks

 

InputOutput
DateDate
202304272702023
2023041818042023
2023022222022023
2023042424042023

 

Input Output
StartEnd StartEnd
20230427nil 20230427nil
nil20230222 nil20230222
20230424nil 20230424nil

 

 

7 REPLIES 7
Raj
14 - Magnetar

sol for case one

binuacs
20 - Arcturus

@griseldagomes two approaches to achieve your result

binuacs_0-1683023211128.png

 

Raj
14 - Magnetar

I see no difference in In and out in the second case

griseldagomes
7 - Meteor

The output is still in yyyymmdd format 

griseldagomes
7 - Meteor

Hi binuacs,

 

First solution was perfect.

For the second one it did convert the necessary values to ddmmyyyy, however the ask was also to retain the value 'nil' in fields where the term 'nil' exists. Is that possible within the same formula please?

binuacs
20 - Arcturus

@griseldagomes Updated the workflow

binuacs_0-1683026095476.png

 

griseldagomes
7 - Meteor

@binuacs spot on. thanks

Labels