name: op-feat-date-features
description: Expand a date or datetime field into year / month / day / day-of-week / quarter (+ hour) columns.
kind: operator
category: FEAT
operator: FEAT_DATE_FEATURES
type: reference
applies_to: process, compose, predict
examples_tags: [feature-engineering, time-series, pre-filter]
Feature operators emit derived columns; no Response.Components.
Use when
Splits a date into year, month, day, day of week and quarter columns, so each part can be filtered, grouped or modelled.
Questions it answers:
- Do orders differ by day of the week?
- Is there a seasonal pattern by month across several years?
Use something else:
ATTR_DATE_PARTwhen you need just one part of the date.GROUP_DATEwhen you want results grouped by day, month or year.
Params
None. Field (required) — params block is unused.
Inputs
Field — date or datetime; any other type is refused.
Output
Columns prefixed by Label (default the field name):
| Column | Type | Range |
|---|---|---|
<prefix>_year | f64 | year |
<prefix>_month | f64 | 1..12 |
<prefix>_day | f64 | 1..31 |
<prefix>_dow | f64 | 0..6, 0 = Sunday |
<prefix>_quarter | f64 | 1..4 |
<prefix>_hour | f64 | 0..23 — datetime only |
Gotchas
- Null source → every column
null. dow0= Sunday, NOT ISO; ignoresweek_start.- Suffixes are
dow/quarter(notday_of_week/is_weekend). - Zone-capable: a
datetimereads the LOCAL clock (slottz→time_zone→ default → UTC). Adateignores zones: explicittzrefused, inherited not applied. - Streamable per-row.
See
pulse_examples_search tags=[time-series],tags=[feature-engineering]- Skills:
feature-engineering,op-attr-date-part,request-envelope(Time zones)