local stringvar v_day;
local stringvar v_result;
v_day :=
select day({@date})
case 1,21,31: "st"
case 2,22: "nd"
case 3,23: "rd"
case 4 to 20,24 to 30: "th";
v_result := totext(day({DateField}),"#",0) + v_day + " day of " + monthname(month({DateField})) + ", " + totext(year({DateField}),"#",0);
v_result