इसके माध्यम से साझा किया गया


last_day function

Applies to: check marked yes Databricks SQL check marked yes Databricks Runtime

Returns the last day of the month that the date belongs to.

Syntax

last_day(expr)

Arguments

  • expr: A DATE expression.

Returns

A DATE.

Examples

> SELECT last_day('2009-01-12');
 2009-01-31