monthname function

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

Returns the three-letter English abbreviation for the month of expr.

Syntax

monthname(expr)

Arguments

  • expr: A DATE, TIMESTAMP, or STRING expression.

Returns

A STRING.

The result is one of Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, or Dec.

Examples

> SELECT monthname(DATE'2024-11-01');
  Nov

> SELECT monthname(TIMESTAMP'2024-04-08 13:08:15');
  Apr