Alteryx Designer Desktop Discussions

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

REPLACING THE YEAR IN DATE COLUMN

dunkindonut7777
8 - Asteroid

Hi I would like to ask about regarding the date column of my data. I I have here series of dates that has 2020 and 2030 year, I would like to replace the 2030 into 2020 same as the other fields.

 

EffectiveDate
3/30/2030
3/30/2030
4/29/2030
4/29/2030
3/10/2020
3/10/2020

 

 

Can you help me this one pls?

10 REPLIES 10
murad
5 - Atom

i've encounter that i would like to change only the year part, so we can use the replace function in the formula tool:

below are the code:

if Left([date_action_up], 4) != '2023' then Replace([date_action_up],Left([date_action_up], 4), '2023')
else [date_action_up]
endif

some screenshot for easy referral.

replace_year.jpg

 

cheers!

Labels