Alert: There is a planned Community maintenance outage October 16th from approximately 10 - 11 PM PST. During this time the Alteryx Community will be inaccessible. Thank you for your understanding!

Alteryx Designer Desktop Discussions

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

Changing date day value to 01

TormentMaker
8 - Asteroid

Hey guys, i would need some help with a date problem i'm having, its something like, my date format is like "yyyy-mm-dd" format, and i would need a solution that allows me to get the day of this date value and change it to "01" independent of the day it is, so if its day 26, 25 or even 13, the solution will change it to 01.

 

Someone knows how to do it?

3 REPLIES 3
Luke_C
17 - Castor

Hi @TormentMaker 

 

Using a formula tool, put datetimetrim([Field],'firstofmonth'). Replace Field with your column name. This assumes the field is already stored as a date.

atcodedog05
22 - Nova
22 - Nova

Hi @TormentMaker 

 

You can use formula like below

DateTimeFormat([Date],"%Y-%m-01")

 

Where day is fixed and set to 01

 

Hope this helps 🙂

TormentMaker
8 - Asteroid

Thanks, both worked as a solution to me!

Labels