Public string f_month_lastdate(string as_month)
string ls_day, ls_date
integer li_row
date ld_date
li_row=28
do while li_row < 33
ls_date=left(as_month, 4)+'/'+right(as_month, 2)+'/'+string(li_row)
if IsDate(ls_date)=false then
ls_day=string(li_row - 1)
return ls_day
end if
li_row ++
loop;