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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Filter out date from a text string

Hi,

I have the follwoing text and I would like to filter out the dates if its possible ?

Iis it possible to use any function or loop the string ?

Regards mikael

M Hyensjö/UK/##May-31-2012 15:56##New request created  A Forsberg/##May-31-2012 15:57##New request created  M Hyenjö/##Jun-01-2012 08:34##Waiting for approval  A Olsson#
1 Solution

Accepted Solutions
simondachstr
Specialist III
Specialist III

This strongly depends on how systematic and clean your data will arrive. In your current example, I would approach it with using Subfield(string,'##') because '##' obviously serves as a delimiter.

If you are e.g. sure that Date will always be located after the first ## within the string, then use Subfield(string,'##',2).

If you're not sure, then try making a loop on all subfields using a logic like IsNull(Date(Subfield(string,'##'))).

View solution in original post

4 Replies
Colin-Albert
Partner - Champion
Partner - Champion

The Textbetween function can extract the data

Not applicable
Author

If the date are in different places depending on the text, how could I use that function ?

simondachstr
Specialist III
Specialist III

This strongly depends on how systematic and clean your data will arrive. In your current example, I would approach it with using Subfield(string,'##') because '##' obviously serves as a delimiter.

If you are e.g. sure that Date will always be located after the first ## within the string, then use Subfield(string,'##',2).

If you're not sure, then try making a loop on all subfields using a logic like IsNull(Date(Subfield(string,'##'))).

Colin-Albert
Partner - Champion
Partner - Champion

This thread has details for using textbetween

Separate text to columns, when between the text it's the "|" caracter