Extract Date&Time Fields

This Node Is Deprecated — This node is kept for backwards-compatibility, but the usage in new workflows is no longer recommended. The documentation below might contain more information.

Extracts the selected fields from a Local Date, Local Time, Local Date Time or Zoned Date Time column and appends their values as corresponding integer or string columns.

Options

Column Selection

Date&Time column
A Local Date, Local Time, Local Date Time or Zoned Date Time column whose fields to extract.

Date Fields

Year
If checked, the year will be extracted and appended as an integer column.
Year (week-based)
If checked, the year based on the week will be extracted and appended as an integer column. Depending on the selected locale, week 1 of a year may already start in the previous year, or week 52 of a year may last until the next year (e.g., 30th Dec 2010 belongs to week 1 of year 2011 (locale en-US), so the extracted Year (week-based) would be 2011 while the extracted Year would be 2010).
Quarter
If checked, the quarter of year will be extracted as a number in range [1-4] and appended as an integer column.
Month (number)
If checked, the month of year will be extracted as a number in range [1-12] and appended as an integer column.
Month (name)
If checked, the month of year will be extracted as a localized name and appended as a string column.
Week
If checked, the week of year will be extracted as a number in range [1-52] and appended as an integer column. A partial week at the beginning of a year is handled according to the chosen locale.
Day of year
If checked, the day of year will be extracted as a number in range [1-366] and appended as an integer column.
Day of month
If checked, the day of month will be extracted as a number in range [1-31] and appended as an integer column.
Day of week (number)
If checked, the day of week will be extracted as a number in range [1-7] and appended as an integer column. The numbering is based on the chosen locale.
Day of week (name)
If checked, the day of week will be extracted as a localized name and appended as a string column.

Time Fields

Hour
If checked, the hour of day will be extracted as a number in range [0-23] and appended as an integer column.
Minute
If checked, the minute of hour will be extracted as a number in range [0-59] and appended as an integer column.
Second
If checked, the second of minute will be extracted as a number in range [0-59] and appended as an integer column.
Subsecond
If checked, the fraction of second will be extracted as number and appended as an integer column. The desired time unit can be specified.
  • milliseconds: extract as milliseconds, range [0-999]
  • microseconds: extract as microseconds, range [0-999,999]
  • nanoseconds: extract as nanoseconds, range [0-999,999,999]

Time Zone Fields

Time zone name
If checked, the unique time zone name will be extracted as a non-localized name and appended as a string column.
Time zone offset
If checked, the time zone offset will be extracted as a localized, formatted number and appended as a string column.

Localization

Locale
The locale that governs the localization of output strings (month, day of week, time zone offset) and takes care of local calendrical characteristics (week and day of week numbering).
Map locales without region
With Java >= v.9 the default locale provider changed from COMPAT (fka JRE) to CLDR causing that locales without a region, e.g., en or de produce differnt results than before. If the option is selected all these locales will be automatically mapped to the corresponding locale containing a region. Note: In a few cases a mapping does not exists and therefore the results will be different.
If it is mandatory to ensure that the results stay the same please adapt the knime.ini and add the following entry -Djava.locale.providers=COMPAT,CLDR,SPI below the -vmargs entry. However, this is not recommended.

Input Ports

Icon
Input table.

Output Ports

Icon
Output table containing the extracted fields as appended columns.

Popular Successors

Views

This node has no views

Workflows

Links

Developers

You want to see the source code for this node? Click the following button and we’ll use our super-powers to find it for you.