Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
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