Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

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

RegexReplace help

nataliad18
8 - Asteroid

Hi guys!
See screenshot attached. I can choose the second of given month, however I need it to be the 2nd of the previous month. (so I need the below option currently to be 2021-11-02), I am trying to use regexreplace to replace the middle part with current month -1, but i am quite new to regexreplace and struggling. Any help is appreciated.
Thank you!
Nat

 

nataliad18_0-1638533020692.png

 

 

2 REPLIES 2
Sebastiaandb
12 - Quasar

Hi @nataliad18 ,

 

Here you go:

 

Datetimeformat(DateTimeAdd(DateTimeNow(),-1,"months"), "%Y-%m-02")

 

Sebastiaandb_0-1638533592217.png

 

Greetings,

 

Seb

 

nataliad18
8 - Asteroid

Thanks @Sebastiaandb worked perfectly

Labels
Top Solution Authors