DATETIME
- DATETIME(year, month, day, hours, minutes, seconds)[source]
Constructs a datetime from the given year, month, day, hour, minute, and second components.
The DATETIME function returns a valid datetime using the specified components. It supports both single values and arrays; if arrays are provided, they must all have the same length, otherwise the returned formula will evaluate to an error.
- Parameters:
- Return type:
- Returns:
A Formula object representing the constructed datetime. If the inputs do not form a valid date/time, 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
``hours`` — accepted types
DECIMAL
DECIMAL_ARRAY
INTEGER
INTEGER_ARRAY
``minutes`` — accepted types
DECIMAL
DECIMAL_ARRAY
INTEGER
INTEGER_ARRAY
``seconds`` — accepted types
DECIMAL
DECIMAL_ARRAY
INTEGER
INTEGER_ARRAY
Return types
DATETIME
DATETIME_ARRAY