last_day function
Applies to:  Databricks SQL 
 Databricks Runtime
Returns the last day of the month that the date belongs to.
Syntax
last_day(expr)
Arguments
- expr: A- DATEexpression.
Returns
A DATE.
Examples
SQL
> SELECT last_day('2009-01-12');
 2009-01-31
> SELECT last_day('2009-02-12');
 2009-02-28