Alteryx Designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
ALTER.NEXT:

Join us on Dec 2 for a half-day virtual analytics + data science event!
US & CA customers only

SAVE YOUR SPOT
It's the most wonderful time of the year - Santalytics 2020 is here! This year, Santa's workshop needs the help of the Alteryx Community to help get back on track, so head over to the Group Hub for all the info to get started!
SOLVED

How to create a new date field based on a formula

Highlighted
Alteryx Partner

In my data source I have a date field. I'd like to create a new field that is also a date but changes the month. For example in my Original Date field I have 6/1/15, I want my new date field to be 5/1/15 (a month behind).

 

Is this possible? I assume I can do this with the Formula module but not sure how to write this.

Highlighted
Alteryx Certified Partner
Alteryx Certified Partner

Try the DateTimeAdd() function in the Formula tool

 

DateTimeAdd([Date], -1, 'month')

 

See attached

Highlighted
Alteryx Partner

I was able to get this to work with the following formula:

DateTimeAdd([Date of Assessment],-1,"months")

Highlighted
Alteryx Partner

Thanks!

Labels