Skip to main content

dt.extract

Extract the specified component from the datetime expression.
unit
Literal['year', 'quarter', 'month', 'week_of_year', 'day', 'day_of_year', 'hour', 'minute', 'second', 'microsecond', 'millisecond']
required

dt.floor

Round down the datetime expression to the specified unit. If an offset is specified, then the datetime will be rounded down to the nearest unit after the offset. If multiple units are specified, these will be combined together to form the unit. E.g. 1 quarter and 1 month will be transformed to 4 months.
years
int | IntegerValue | None
quarters
int | IntegerValue | None
months
int | IntegerValue | None
weeks
int | IntegerValue | None
days
int | IntegerValue | None
hours
int | IntegerValue | None
minutes
int | IntegerValue | None
seconds
int | IntegerValue | None
milliseconds
int | IntegerValue | None
offset
IntervalValue | None