Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
Could anyone tell me, plese, why
PurgeChar(peek(debit_date), SubField(peek(debit_date),'-',1))
returns '-8.5.24',
if the incoming string is '100000-08.05.2014'?
Thanks in advance
Carlo Belletti, thank you for responce. Can you kindly explain how does it get '-8.5.24' in such way? and how to gwet the substring without first substring in such a way?
regards,
Alexa
Hi,
it is giving correct answer only
here you have
if the incoming string is '100000-08.05.2014'
PurgeChar(peek(debit_date), SubField(peek(debit_date),'-',1))
returns '-8.5.24',
keepChar(peek(debit_date), SubField(peek(debit_date),'-',1))
it will give 100000
subfield(peek(debit_date),'-',1)) it will give 100000
subfield(peek(debit_date),'-',2)) it will give 08.05.2014
according to your requirement you can use these scenarios
oh, yeah... now I understand my error... I thougth it works like subfielb, but extracts ... didnt mentioned that it takes away all the symbols =(
thanks for explanation/
Only question is why should
keepChar(peek(debit_date), SubField(peek(debit_date),'-',1))
give 100000 and not 1000000001?
If I have figured out correctly your problem, i think a possible solution is:
Step1: index the '-' character with the index function
in your specified case index function in debit_date field, for '-' character returns 7
INDEX FUNCTION: index(debit_date,'-')
you have to use this value in the FINAL FUNCTION..
Step2
use the result of the first step to select only the string partyou need (in your case date part)
FINAL FUNCTION: mid(debit_date,index(debit_date,'-'))
This method solve the problem of the debit string lenght.
Yeah you are right that keepchar syntax will give 1000000001
it will keep all the characters what we gave values to keep in the list
thank you once more Carlo Belletti because i've just understood, that YOUR answer is correct=)