Extract date part

This task allows you to extract parts of date from a date column.

Table of Contents

Quick Start

Let us start with the following data.

Table 12 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.

Table 13 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:

  1. Open Data Preparation menu and click on Date Function
  2. Select Extract Date Part
  3. Choose the column Date
  4. Choose the option Weekday in the selection for What to extract
  5. Enter the name Weekday in the result column section
  6. 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.
Table 14 Date components
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

See also

Result Column

The result column documentation

Number Formatting

The numeric formatter documentation