powered by
It acts similiarly to Excel's EOMONTH function. It returns the end of month date for the specified date.
EOMONTH(date, months = 0)
Give the date argument so it can give you the end of the month.
The number of months before or after start_date. A positive value for months yields a future date; a negative value yields a past date.
In this case we specify 2nd June 2008. Function returns end of the month which is 30th June 2008. Function will always return Date class.
# NOT RUN { EOMONTH(DATE(2008,6,2)) # }
Run the code above in your browser using DataLab