Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
sifatnabil
Specialist
Specialist

Get substring from string

Hi all,

I have a string like this:

* 11.500%|955597946785402|10-Oct-2018|11.500

I need to get the bolded part but the part in red is arbitrary in length. Is there a good way to get this?

1 Solution

Accepted Solutions
marcus_sommer

Use: subfield(YourField, '|', 2)

- Marcus

View solution in original post

4 Replies
marcus_sommer

Use: subfield(YourField, '|', 2)

- Marcus

Colin-Albert
Partner - Champion
Partner - Champion

Use the subfield command

subfield(YourFieldName, '|', 2)

subfield('11.500%|955597946785402|10-Oct-2018|11.500', '|', 2)  will return 955597946785402

sinanozdemir
Specialist III
Specialist III

Hi,

Subfield() should do it:

Capture.PNG

Capture.PNG

Thanks

sifatnabil
Specialist
Specialist
Author

Ah this was so simple but saw it as more complicated than it really is. Thanks!