Carrot reference
Functions

month()

Returns the ordinal number of the month of a particular date, from 1-12, where 1 is January, 2 is February, and so on.

Syntax

month(date)

  • date - the Date value to be evaluated by the function.
  • Return type: Number

Sample usage

month('2020-05-12') returns 5.

Supported data types

Input type

Return type

Logic

Date

Number

If a Date value is passed, the ordinal number of the month will be returned as a Number value.

Unsupported data types

Null

Unsupported data types return Null.



Updated 04 Oct 2023
Doc contributor
Did this page help you?