You can use the DAYS and DAYSTODATE built-in functions to make date comparisons and calculations manually.
To compare two dates d1 and d2 which have the date pattern YYMMDD, you can use the following code:
DAYS (d1, 'YYMMDD', w) < DAYS(d2, 'YYMMDD', w)
You can convert between a two-digit date (d1) with the pattern YYMMDD and a four-digit date (d2) with the pattern YYYYMMDD using assignments:
d2 = DAYSTODATE(DAYS(d1,'YYMMDD',w), 'YYYYMMDD'); d1 = DAYSTODATE(DAYS(d2,'YYYYMMDD'), 'YYMMDD' ,w);