FUNCTION DayInMonth LPARAMETERS pnMonth RETURN DAY(GOMONTH(CTOD(TRANSFORM(pnMonth)+"/01/"+TRANSFORM(YEAR())),1)-1)