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

Add a delimiter twice

Farriyajawed
7 - Meteor

Hello, 

 

I have a number 127000000 and I need to change it to 1270-00-000. 

 

I am using this formula but it is not getting the complete statement: 

Left(ToString([Code]), 4)+"-"+Right(ToString([Code]), 2) 

 

2 REPLIES 2
apathetichell
20 - Arcturus
Left(ToString([Code]), 4)+"-"+Right(ToString([Code]), 2) 

 

you could do this via regex_replace with regex_replace([field1],"^(.{4})(.{2})(.{3})","$1-$2-$3") 

Prometheus
12 - Quasar

@Farriyajawed Try this: Left(ToString([Code]), 4)+"-"+Substring([Code],4,2)+'-'+Right(ToString([Code]), 3) 

Labels
Top Solution Authors