The dt accessor provides vectorised datetime operations on a
Series<Date>, mirroring
pandas.Series.dt.
All methods propagate null / undefined unchanged.
Edit any code block below and press ▶ Run
(or Ctrl+Enter) to execute it live in your browser.
Extract individual date/time fields from each element.
dayofweek() returns Monday=0, Sunday=6 (same as pandas).
quarter() returns 1–4.
Check whether dates fall on month/quarter/year boundaries.
Format dates using strftime-style directives.
normalize() strips the time component (floor to midnight).
floor(), ceil(), and round() support
units: "D" (day), "H" (hour),
"T"/"min" (minute),
"S" (second), "L"/"ms" (millisecond).
Like pandas, all dt methods propagate null unchanged.
total_seconds() returns the Unix timestamp in seconds.
date() returns the date portion (midnight-normalized).
Use dt accessors together to extract and combine multiple fields.
Access via series.dt on any Series<Date>.
All methods return a new Series and propagate nulls.
// Calendar components
series.dt.year() → Series<number>
series.dt.month() → Series<number> // 1–12
series.dt.day() → Series<number> // 1–31
series.dt.hour() → Series<number> // 0–23
series.dt.minute() → Series<number> // 0–59
series.dt.second() → Series<number> // 0–59
// Derived fields
series.dt.dayofweek() → Series<number> // Mon=0, Sun=6
series.dt.dayofyear() → Series<number> // 1–366
series.dt.quarter() → Series<number> // 1–4
// Boolean properties
series.dt.is_month_start() → Series<boolean>
series.dt.is_month_end() → Series<boolean>
series.dt.is_quarter_start() → Series<boolean>
series.dt.is_quarter_end() → Series<boolean>
series.dt.is_year_start() → Series<boolean>
series.dt.is_year_end() → Series<boolean>
series.dt.is_leap_year() → Series<boolean>
series.dt.days_in_month() → Series<number>
// Formatting & conversion
series.dt.strftime(fmt) → Series<string>
series.dt.normalize() → Series<Date>
series.dt.date() → Series<Date>
series.dt.total_seconds() → Series<number>
// Rounding (freq: "D" | "H" | "T" | "S" | "L")
series.dt.floor(freq) → Series<Date>
series.dt.ceil(freq) → Series<Date>
series.dt.round(freq) → Series<Date>