Your dateString is of date or timestamp data type with a numerical representation, right? (You could check this in table view). It seems that the right function is applied to the numerical representation, not the textual.
But I would agree this is not the result I would expect and it seems to break existing coding.
I am just working on QV 11 IR at the moment, in this version it's returning the correct string part.
I am going to test on QV 11 SR1 later on.
Yes, I think that's a bug.
dateString is a varchar hence a right([varchar],5) should give me the last 5 chars of the string...
And as I mentionned, it worked fine on Qlikview 10.
I just feel bad for people who might extensively use this function on dates and are going to upgrade... BEWARE!
I'm just going to replace dateString by Month&' '&Day... But both should have worked.
I believe your dateString will automatically be parsed in as date type by QV (given the standard date format matches). You might want to check the date type in table view by hovering over the field to verify this.
And I believe Martin's suggested workaround should work also, but using date functions like Month and Day might be a good solution anyway.