Get current financial year in axapta

display str CurFinYr()
{

DtFrm = frmdt;
strdtfrm = date2str(dtfrm, 123, 2, 4, 2, 4, 4);

yy = str2int(substr(strdtfrm, 7, 4));

Fyy = substr(int2str(yy),3,2);

DtTo = toDt;
strdtto = date2str(DtTo, 123, 2, 4, 2, 4, 4);
yy = str2int(substr(strdtto, 7, 4));
Tyy = substr(int2str(yy),3,2);


CurFinYr=Fyy+" - "+Tyy;
return CurFinYr;
}