Alteryx Designer Desktop Discussions

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

How do i remove dates from a phone number field

rhtkiong
5 - Atom

Hi, I have a phone number column where it is mixed with phone numbers and dates.  Is there a way that i could identify which are dates and which are not and separate them or to totally remove the dates.

 

Thanks.  

6 REPLIES 6

Hi @rhtkiong 

 

Could you please provide some data samples? Thanks!

leon2020
7 - Meteor

A formula tool using REGEX_Replace sounds like what you need.  For example REGEX_Replace([field_name],"\d\d\d\d\d\d", "") would remove any six consecutive digits.  

 

Depends on the format of the data and the format of the telephone numbers and if there are any other split characters or items in the string.  Can you provide an example?

 

Regex is not an easy tool to get to grips with, but worth the effort to learn and will be able to solve for your case : https://community.alteryx.com/t5/Alteryx-Designer-Knowledge-Base/Tool-Mastery-RegEx/ta-p/37689

 

rhtkiong
5 - Atom

Hi Christine, if you refer to the fax column, you will see there is a mixture of date and numbers

Thanks @rhtkiong but I can't access the excel file. It has to be packaged. You could either send me the file or just copy paste few cells here so I can see the format.

rhtkiong
5 - Atom

Hi Christine

 

here is the sample excel i have extracted. 

 

Thanks @rhtkiong 

 

Please check the below. I included "_" and "/" to take into account the different dates format. You can then add a filter tool to get rid of dates. Please let me know if this works. Cheers!

 

christine_assaad_0-1607359265839.png

 

Labels