# QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Support Cases coming to Qlik Community Oct. 4! Start chats, open cases, explore resources: READ DETAILS
cancel
Showing results for
Did you mean:
Contributor II

## Pick up specific date from a string

Hello experts, I am new to Qlik and I am trying to pick up some useful information (date) from a string ([Invoice Code]), which looks something like "Connecticut (SAP) - Connecticut Ltd - 4200001444 - WE 06/05/2018 - INV 06/05/2018".

All I want is getting the date of the "WE", i.e.  "06/05/2018" from the above (not the date after "INV").

I used PurgeChar(Upper([Invoice Code]),'ABCDEFGHIJKLMNOPQRSTUVXYZ') to get rid of the characters except "W".

I then used

MID(PurgeChar(Upper([Invoice Code]),'ABCDEFGHIJKLMNOPQRSTUVXYZ-'),FindOneOf('W',PurgeChar(Upper([Invoice Code]),'ABCDEFGHIJKLMNOPQRSTUVXYZ-'),10)+3,10)

to find the location number of "W" and from that fetch the next 10 characters but the output is ") 4200".

I have attached the qvw.

Any ideas would be grateful. Many thanks.

Labels (2)

• ### purgechar()

1 Solution

Accepted Solutions
Master II

One more way to do this is:

= Mid( [Invoice Code],Index ( [Invoice Code], 'WE ' )+3 ,10)

and it will give you the date after 'WE '. Hope this helps.

3 Replies
Master II

date(textbetween([Invoice Code],' WE ',' - ') as YourFieldName

Master II

One more way to do this is:

= Mid( [Invoice Code],Index ( [Invoice Code], 'WE ' )+3 ,10)

and it will give you the date after 'WE '. Hope this helps.

Contributor II
Author

Many thanks for all your help!

Community Browser