Si no tenes la libreria o usas xharbour este pequeño programa te resuelve tu problema
Puedes escribir de la siguiente forma
Local fFecha := CTOD("03/02/2012") // la fecha que tu quieres consultar
Local uFecha := Date() // le das forma a la variable
uFecha := UltimoDia( fFecha ) // aqui la funcion te devuelve la fecha con el ultimo dia del mes
//---------------------------------------------------------------------------//
// Method UltimoDia( ) Retorna el el final de un mes
//--------------------------------------------------------------------------//
Function UltimoDia(xFecha)
Local xMes := Month( xFecha )
Local xAno := Year( xFecha )
Local nDias := 1
Local MiFecha := Date()
MiFecha := CTOD("01/"+StrZero(Month(xFecha),2)+"/"+StrZero(Year(xFecha),4))
Do While nDias < 31
MiFecha := MiFecha + 1
If Month( MiFecha ) > xMes
Exit
EndIf
nDias := nDias + 1
If nDias = 31
Exit
EndIF
EndDo
MiFecha := CTOD( StrZero(nDias,2)+"/"+StrZero(xMes,2)+"/"+StrZero(xAno,4) )
Return( MiFecha )
//--------------------------------------------------------------------------//