Hi,
If you are concerned with only last dates of the month, then may be you can use the following:
select -- n months previous end day (eg below is 4 months) -- ( biggest frig comparred to the others)
current year to day -3 units month - (day(current)) units day as prevN_month_end
from systables
where tabname = 'systables'
Bye
Nitin