>a=alltrim(substr(str(YEAR(date())),1,4)) >>I want to extract last two characters of year i.e. 05
&& breaking it down gives ? str(YEAR(date())) && returns a string of length 10, six spaces and 2005 ?substr(str(YEAR(date())),1,4) && results in 4 blanks ?alltrim(substr(str(YEAR(date())),1,4)) && returns the empty string either ?substr(str(YEAR(date()),4),3,2) or ?substr(dtos(date()),3,2)