Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
Im little bit confuse to know Index
Could you please some one explain me What is Index
Where Can We use in Script
Thanks in Advance
Niranjan
hi
About Index--
Position of a substring. This function gives the starting position of the n:th occurrence of substring s2 in string s1. If n is omitted, the first occurrence is assumed. If n is negative, the search is made starting from the end of string s1. The result is an integer. The positions in the string are numbered from 1 and up.
Examples:
index( 'abcdefg', 'cd' ) returns 3
index( 'abcdabcd', 'b', 2 ) returns 6
index( 'abcdabcd', 'b', -2 ) returns 2
left( Date, index( Date,'-') -1 ) where Date = 1997-07-14 returns 1997
mid( Date, index( Date, '-', 2 ) -2, 2 ) where Date = 1997-07-14 returns 07
Hi vishwa,
Here im straggle to understand "index( 'abcdabcd', 'b', -2 ) returns 2"
the purpose -2, index( Date,'-') -1 ,this both syntax i cant able to understand
will you plz explian
Thanks & Regards
Niranjan