Although this isn’t quite as clean of a way as I’d like, you could use the character function to convert the date into a character field, from which you could then substring the 3rd & 4th positions of the year, so you could bypass setting up a data structure.
Assuming that year is a character field, you could do something like this:
Year = %Subst( %Char( SomeDateField: *ISO): 3: 2);
Or you can define a date field with DatFmt(*YMD) to convert original date to this format. Then you can use %Subdt.
D DateYMD S D DatFmt(*YMD) (or *DMY)
C Eval DateYMD = YourDateISO
C Eval YY = %SubDt(DateYMD:*Y)
Also assuming char field
EVAL %SUBST(@temp:3:2) = @YY
Note that using *Y as the second parameter for the %SubDt BIF will always return a four digit year, even if the date format is *MDY or *YMD, so that is why %SubSt would seem the only sure way of getting a two digit year, at this point.
CWC is right! %SubDt will return 4 digits year and as he said %SubSt will be the right way.