polars.datetime#

polars.datetime(year: Expr | str | int, month: Expr | str | int, day: Expr | str | int, hour: Expr | str | int | None = None, minute: Expr | str | int | None = None, second: Expr | str | int | None = None, microsecond: Expr | str | int | None = None) Expr[source]#

Create polars Datetime from distinct time components.

Parameters:
year

column or literal.

month

column or literal, ranging from 1-12.

day

column or literal, ranging from 1-31.

hour

column or literal, ranging from 1-23.

minute

column or literal, ranging from 1-59.

second

column or literal, ranging from 1-59.

microsecond

column or literal, ranging from 1-999999.

Returns:
Expr of type pl.Datetime