We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Formula for Day of Month

heatherpaquette
7 - Meteor

How would I create a formula for the day of the month?  I currently have a VWString format setup for 2023-10-12 and I would like to add another column that only represents the 12.  

3 REPLIES 3
DataNath
17 - Castor
17 - Castor

Hey @heatherpaquette, you can just use the DateTimeDay() function in a Formula tool expression which isolates the day part of an ISO-formatted date:

 

 

DateTimeDay([Field])

 

heatherpaquette
7 - Meteor

Thank you very much, that worked great.  I'm a new user so just trying to get familiar.

DataNath
17 - Castor
17 - Castor

No problem @heatherpaquette - glad that helped! As you'll always need dates in ISO format to work with them, the day will always be the rightmost 2 characters so you could also use the following which just takes N characters from the right of the string:

 

Right([Field], 2)
Labels
Top Solution Authors