Extract Date Part
Pull the year, month, hour or weekday out of a date, as a number.
What it does
A date column holds one full timestamp per row. Extract Date Part takes one piece of it. The result is a plain number. Numbers group and chart well, so this step often comes before a group or a pivot.
Extract a part
- Type extract date in the Search transforms box, in the Pipeline panel.
- Select Extract Date Part in the results list.
- Under Select column, click the box and pick your date column. A text column holding dates works too.
- Open Date part. It reads Choose... at first.
- Select the part you want, such as hour.
- Type a name in New Column Name.
- Click Apply.
Example: a server log has an event_time column. Extract hour into a column named event_hour. You can now count events per hour of the day.
The parts you can pick
- year, for example 2026.
- month, from 1 to 12.
- day, the day of the month.
- hour, minute and second, from the time part of the value.
- dow, the day of the week as a number.
- week, the week number inside the year.
Where the number goes
The Apply results into section has two buttons. New Column (Number) is selected for you. Type your column name in the box below it. The name must not match a column you already have.
Select Existing Column to write over a column instead. A dropdown then lists every column in the table. Pick the one to overwrite.
Dates that arrived as text
A CSV carries no type information, so a date column often lands as plain text: 31/01/2026, or a file with one stray header row in the middle. That used to lock the whole Date group: the picker was empty and the panel told you to go and convert something.
Text columns are offered here too, listed after the real date columns and marked so you can tell them apart. The step reads them as dates on the way in, using the same reading Convert Type would: one convention decided for the whole column, so 01/02/2026 and 25/12/2026 in one column are both read day-first. A value that cannot be read comes back empty.
The reading is not stored. The column stays text in the grid, and every later step has to read it again. If you are going to do more than one thing with those dates, run Convert Type once and make it permanent.
Notes
- The column picker lists date columns first, then text columns that could hold dates. Number columns do not appear.
- With nothing datelike in the table at all, the panel says so and points at Convert Type.
- With exactly one date column, the picker fills itself in for you.
- Leave New Column Name empty and the column is named after the source, such as event_time_hour.
For SQL users
The result is cast to a whole number. Extracting the hour runs as:
SELECT *, EXTRACT(hour FROM "event_time")::INTEGER AS "event_hour" FROM data
Try Extract Date Part with sample data →
Related Operations
- Increment Date - Add/subtract time intervals
- Date Difference - Calculate difference between two dates