Let’s talk Alteryx Copilot. Join the live AMA event to connect with the Alteryx team, ask questions, and hear how others are exploring what Copilot can do. Have Copilot questions? Ask here!
Start Free Trial

Alteryx Designer Desktop Discussions

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

How to create a new date field based on a formula

MaryB
7 - Meteor

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.

3 REPLIES 3
michael_treadwell
ACE Emeritus
ACE Emeritus

Try the DateTimeAdd() function in the Formula tool

 

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

 

See attached

MaryB
7 - Meteor

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

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

MaryB
7 - Meteor

Thanks!

Labels
Top Solution Authors