Let’s talk Alteryx Copilot. Join the live AMA event to connect with the Alteryx team, ask questions, and hear how others are exploring what Copilot can do. Have Copilot questions? Ask here!
Start Free Trial

Alteryx Designer Desktop Discussions

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

Converting 16 digits to 4 digits with hyphen

knozawa
11 - Bolide

Hello,

 

I would like to convert 000000028309094X to 4 digits with hyphen:

0000-0002-8309-094X. <--X is an alphabetic.

 

I was trying to do that with Regex tool.  But it didn't work.

 

Does anyone know how to solve this issue?

 

Thank you,

Kazumi

 

2 REPLIES 2
adm510
11 - Bolide

Try this with the formula tool:

 

Substring([Field1],0,4)
+ '-'
+ Substring([Field1],4,4)
+ '-'
+ Substring([Field1],8,4)
+ '-'
+ Substring([Field1],12,4)

 

 

I like to break long formulas into multiple lines for clarity

knozawa
11 - Bolide

@adm510,

 

Worked!  Thank you!

 

Sincerely,

Kazumi

Labels
Top Solution Authors