In case you missed the announcement: Alteryx One is here, and so is the Spring Release! Learn more about these new and exciting releases here!

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
14 - Magnetar

Hi @nirvapatel1998 

 

Assuming your date is in string format:

 

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

@DataNathalmost snap :)

nirvapatel1998
7 - Meteor

Thank you DataNath

nirvapatel1998
7 - Meteor

Thank you David

Labels
Top Solution Authors