Alteryx Designer Desktop Discussions

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

Format Date

RR8
7 - Meteor

Hi 

I am trying to write a formula that will show the dates as follows (ie always 7 digits)

2021001

2021002

2021003

2021010

2021011

 

Depending on current month -1

 

ie now would be 2021008 so I would need to consider when I get to January it would need to be 2021012

 

Please can someone help.

 

thanks so much

 

4 REPLIES 4
RR8
7 - Meteor

I meant now would be 2021007! apologies

atcodedog05
22 - Nova
22 - Nova

Hi @RR8 

 

Use formula like below

 

DateTimeFormat(DateTimeAdd(DateTimeToday(),-1,"month"),"%Y0%m")

 

Workflow:

atcodedog05_0-1628693048401.png

 

Hope this helps : )

RR8
7 - Meteor

thanks so much very quick to respond

atcodedog05
22 - Nova
22 - Nova

Happy to help : ) @RR8 

Cheers and have a nice day!

Labels