Have a field InvoicedDate. I want to get the last two digits of the year of the InvoiceDate value. So for example, if InvoiceDate contains “2/15/2021” I want to get the result “21”. This is what I’ve tried:
Looks okay to me, but it returns #ERROR. I suspect it’s a typing problem, that is, YEAR() returns a number, but RIGHT() can only be used with a string. But I can’t see how to coerce the number to be a string. I’ve reread the functions reference but can’t find a NUMSTR() function or anything like that. What am I missing?
Heh. I think I’ve asked this question or one very like it before and gotten this good answer. This to me isn’t quite as intuitive as coercing the type to string by adding & “” as @augmented suggested. But your suggestion is one I need to remember, too. Thanks!