A thread a while ago was discussing the best way to find the last day of the current month. Since I couldn't find the messages I'll go ahead and answer the question here. The following code will find the last day of the month when passed a date parameter:
Procedure LastDay
LPARAMETERS dCurrent
LOCAL lcValue, lcMonth, lcYear, ldValue, ldNewDate
ldValue = GOMONTH(dCurrent,1)
lcMonth = STR(MONTH(ldValue))
lcYear = STR(YEAR(ldValue)
lcValue = lcMonth+"/"+"01"+"/"+lcYear
ldNewDate = CTOD(lcValue) - 1
Return ldNewDate