Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'm using QV 8.5 and I'm having a problem with the right() function.
This is what I'm writing:
LET V_File_Ext = right(text('ABC123567901xls'),12);
And it's returning 123567901xls.
It should returing xls since I have 12 chars before it.
Am I doing something wrong?
The QV file is attached.
Thanks,
Cassiano
The function is working as expected. Per the documentation, the Right() function returns the rightmost n characters. So, Right('somelongstring', 12) will return 'melongstring'.
The relevant portion of the documentation reads "Substring of the string s. The result is a string consisting of the last n characters of s."
The function is working as expected. Per the documentation, the Right() function returns the rightmost n characters. So, Right('somelongstring', 12) will return 'melongstring'.
The relevant portion of the documentation reads "Substring of the string s. The result is a string consisting of the last n characters of s."
Thanks, I didn't understand the function before.
If you want to extract the extension from the filename a good function is subfield()
LET V_File_Ext = subfield('ABC12356790.xls', '.', -1);
-Rob