Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

DateTimeAdd with DateTimeLastofMonth on a specific field

alphabex18
8 - Asteroid

I am using the formula tool for changing a field based on a condition. I am using the Output column "GroupTermDate", and i want to change that field. 

Here is my IF Statement that isnt working.....

 

IF [GroupTermCode] = "NP"

THEN DateTimeAdd(DateTimeLastOfMonth(),1,'month') {I cant figure where to insert the field "GroupTermDate" that i want this part to change.}

ELSE [GroupTermDate] ENDIF

 

Bottom line, if the group term code is "NP", then i want to current GroupTermDate to change to the next month on the last day of the month. If the group term code is not NP, then it can stay the same. 

 

 

Thank you

2 REPLIES 2
geraldo
13 - Pulsar

hi

 

check this formula

 

 

DateTimeTrim(DateTimeAdd ([GroupTermDate], 1, 'month'),'lastofmonth')

 

[]

alphabex18
8 - Asteroid

Bless your heart Geraldo! it works

 

Thank you so much

Labels