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

Alteryx Designer Desktop Discussions

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

Converting YYYYMM to YYYYMMdd but the Day can be customized.

wonka1234
10 - Fireball

Hi,

 

How can I convert YYYYMM to YYYYMMdd but the Day can be customized. .

Ie the date seems to be defaulting to the first of the month, how can i specify the day? 

 

Thanks.

 

 

wonka1234_1-1674159418215.png

 

4 REPLIES 4
Luke_C
17 - Castor
17 - Castor

Is there a specific date (or logic) you want to use to determine the day? Or make it fully configurable for users to choose?

wonka1234
10 - Fireball

@Luke_C 

I would like it configurable but also a way to make it the 13th of every month.

Felipe_Ribeir0
16 - Nebula

Hi @wonka1234 

 

If you mean configuring the day hardcoded, you can use this formula

datetimeformat(datetimeparse([Date], '%Y%m'), '%Y-%m-13')

 

Felipe_Ribeir0_1-1674159696995.png

 

Felipe_Ribeir0
16 - Nebula

Hi @wonka1234 

 

The previous formula was unnecessarily complex, this one is much more clean.

datetimeparse([Date] + '13', '%Y%m%d')

 

Felipe_Ribeir0_0-1674162592977.png

 

 

 

Labels