Extract date part
This task allows you to extract parts of date from a date column.
Quickstart
Let us start with the following data:
Birthdays → View 1
Name | Date |
---|---|
Alice | 12-July-1989 |
Bob | 9-August-1976 |
Chuck | 9-January-2001 |
Let us assume we would like to know which day of the week these people were born in. We want to get the weekdays out of this.
Expected output data will look like this.
Birthdays → View 1
Name | Date | Weekday |
---|---|---|
Alice | 12-July-1989 | Wednesday |
Bob | 9-August-1976 | Monday |
Chuck | 9-January-2001 | Tuesday |
We can achieve that by doing the following:
- Go to Transform > Date Functions.
- Select the function Extract Date Part.
- Choose the column Date.
- Choose the option Weekday in the selection for What to extract.
- Enter the name Weekday in the result column section.
- Hit APPLY.
Supported Options
The following options are supported by this task.
- Extract date from: The column to extract date from.
- What to Extract: The component of the date to extract.
- Apply result into: This option allows configuration of the destination of the results by this task. See result documentation.
Component | Extracted Data Type | Description | Example |
---|---|---|---|
Year | Numeric | The year part of date | 2015 |
Month | Numeric | Month as a number between 1-12 | 7 |
Month Name | Text | English name of the Month | January |
Month & Year | Text | Month as Text and Year | August, 2012 |
Date Part without time | Text | Date Part ignoring time | 1989-07-12 |
Time Part without Date | Text | Just the Time part of the date | 00:00:00 |
Quarter | Numeric | Quarter of the year | 3 |
Weekday | Text | English day of week | Monday |
Day of Year | Numeric | The day of the year as a number between 1-366 | 234 |
Day | Numeric | The day of the month | 12 |
Hour | Numeric | Hour of day between 0 & 23 | 11 |
Minute | Numeric | Minute of the hour between 0 & 59 | 23 |
Second | Numeric | Second of the minute between 0 & 59 | 46 |