EOMONTH
Description
This function returns the last day of the month containing a specified date, with an optional offset. (EOMONTH in Transact-SQL).
Sample Source Pattern
Syntax
EOMONTH ( start_date [, month_to_add ] ) LAST_DAY( <date_or_time_expr> [ , <date_part> ] )Examples
Code:
SELECT EOMONTH (GETDATE()) AS Result; Result:
RESULT|
----------+
2022-05-31|Code:
SELECT
LAST_DAY(DATEADD('month', 0, CURRENT_TIMESTAMP() :: TIMESTAMP)) AS Result;Result:
RESULT|
----------+
2022-05-31|Last updated