LAST DAY of a month in Teradata

Computing the last day of a month:

SELECT ADD_MONTHS(( 'input date' - EXTRACT(DAY FROM 'input date') + 1),1)-1; 

If you want to calculate the last day of '2012-06-06'
SELECT ADD_MONTHS(( '2012-06-06' - EXTRACT(DAY FROM '2012-06-06') + 1),1)-1; 

Result: '2012-06-30'

The code above first calculates the first day of the month (Noticed the inner code ?) then add a month to it.
After that it will subtract one day which will yield last day of the month.