DATE

DATE(year, month, day)[source]

Constructs a date from the given year, month, and day components.

The DATE function returns a valid date using the specified year, month, and day. It supports both single values and arrays; if arrays are provided, they must all have the same length, otherwise the formula will evaluate to an error.

Parameters:
  • year (Operand | int) – The year component of the date.

  • month (Operand | int) – The month component of the date (1–12).

  • day (Operand | int) – The day component of the date.

Return type:

Formula

Returns:

A Formula object representing the constructed date. If the inputs do not form a valid date, the formula will evaluate to an error.

Raises:

ValueError – If any input is not numeric or an array of numeric values.

``year`` — accepted types

  • DECIMAL

  • DECIMAL_ARRAY

  • INTEGER

  • INTEGER_ARRAY

``month`` — accepted types

  • DECIMAL

  • DECIMAL_ARRAY

  • INTEGER

  • INTEGER_ARRAY

``day`` — accepted types

  • DECIMAL

  • DECIMAL_ARRAY

  • INTEGER

  • INTEGER_ARRAY

Return types

  • DATE

  • DATE_ARRAY