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 (CURRENT_TIMESTAMP() :: TIMESTAMP ) AS Result;Result:
RESULT|
----------+
2022-05-31|Last updated
Was this helpful?