Please help with an easy way to replace only the year of the date based on condition
* if the year in the date is greater than 2032 then change it to 2032
it should look like this.
Appreciate your help. Thanks
Solved! Go to Solution.
Hi @Mahesh6279
IF tonumber(right([Field1],2))>32
THEN REGEX_Replace([Field1], "(\d{1,2}/\d{1,2}/\d{2})(\d{2})", "$1")+"32"
ELSE [Field1]
ENDIF
Many thanks
Shanker V
can you please modify the code for this date format " 2037-12-31"
IF
ToNumber(left([PRICING_VALID_END_DT], 4)) > 2032
THEN
"2032"+substring([PRICING_VALID_END_DT],4,10)
ELSE
[PRICING_VALID_END_DT]
ENDIF