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

Alteryx Designer Desktop Discussions

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

Converting Date

nirvapatel1998
7 - Meteor

Hi All. 

 

I have  a date format 9-Aug-22 and I want to convert it to 20220809. Any suggestions on how I can get it? 

 

Thank you in advance.

5 REPLIES 5
DataNath
17 - Castor
17 - Castor

Hey @nirvapatel1998, this should do the trick. You first parse out the date from your incoming string, before wrapping that in the DateTimeFormat() function to get your desired format:

 

DateTimeFormat(DateTimeParse([Incoming Date],'%d-%b-%y'),'%Y%m%d')

 

DataNath_0-1660313386063.png

DavidSkaife
13 - Pulsar

Hi @nirvapatel1998 

 

Assuming your date is in string format:

 

DateTimeFormat(DateTimeParse([Date],'%d-%h-%y'),'%Y%m%d')
DavidSkaife
13 - Pulsar

@DataNathalmost snap :)

nirvapatel1998
7 - Meteor

Thank you DataNath

nirvapatel1998
7 - Meteor

Thank you David

Labels
Top Solution Authors