Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
HI ALl,
Can someone explain me what does the below expression does ?
mid(FileName(),34,6) as Year_Month,
mid(FileName(),34,6) as Year_Month,
mid() if the function to fetch the values between a range
34 - starting point of the fetching the values
6 - is the length till it should fetch i.e it will fetch the values from 34 to 40
From Qlikview Help
Mid() returns the part of the input string starting at the position of the character defined by the second argument, 'start', and returning the number of characters defined by the third argument, 'count'. If 'count' is omitted, the rest of the input string is returned. The first character in the input string is numbered 1.
Syntax:
Mid(text, start[, count])
Return data type: string
Arguments:
Argument | Description |
---|---|
text | The original string. |
start | Integer defining the position of the first character in text to include. |
count | Defines the string length of the output string. If omitted, all characters from the position defined by start are included. |
Example | Result |
---|---|
Mid('abcdef',3 ) | Returns 'cdef' |
Mid('abcdef',3, 2 ) | Returns 'cd' |
mid(FileName(),34,6) as Year_Month,
mid() if the function to fetch the values between a range
34 - starting point of the fetching the values
6 - is the length till it should fetch i.e it will fetch the values from 34 to 40
hate to nit-pick
it will retrieve characters 34 to 39 (inclusive)