Start Free Trial

Alteryx Designer Desktop Discussions

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

Trim and Copy numbers st passed the date

jansson17
5 - Atom

I have a column of dates with added digits to the end of each date. 
I need to be able to trim the trailing digits off the end of the string/year and place them into a new column label overage.

Date
4/12/202252
7/8/202224
5/10/202248
3/17/202265
8/12/202298
4/27/202217
10/10/202299
12/1/202278
1/13/202296

 

 

Goal

 

DateOverage
4/12/202252
7/8/202224
5/10/202248
  
  
  
  
  
  
2 REPLIES 2
cjaneczko
13 - Pulsar

You can use a formula tool. To extract the date you can use Regex \d+\/\d+\/\d{4}. For the trailing digits you can use a right(FieldName,2)

GMG0241
8 - Asteroid

Following on from @cjaneczko, If you want an all in one, you can use REGEX_REPLACE([Date],"\d+\/\d+\/\d{4}(.*)","$1") where the regex expression in the brackets is outputted. In the example I provided, it gets any character (digit, string, whatever) but you could change it to something like  "\d+\/\d+\/\d{4}(\d+)" if you specifically only wanted to grab digits

Labels
Top Solution Authors