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.

    Supported types:

    • INTEGER

    • INTEGER_ARRAY

  • month (Operand | int) –

    The month component of the date (1–12).

    Supported types:

    • INTEGER

    • INTEGER_ARRAY

  • day (Operand | int) –

    The day component of the date.

    Supported types:

    • INTEGER

    • INTEGER_ARRAY

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.

Supported types:

  • DATE

  • DATE_ARRAY

Raises:

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