String to Duration

Converts string cells to duration cells. The input strings can follow the ISO 8601 format (see date-based duration format or time-based duration format for details, e.g. P2Y3M1D), a short letter format (e.g., 2y 3M 1d or 2H 3m 1s), or a long word format (e.g., 2 years 3 months 1 day).
Commonly applied when preparing data containing text-based durations for calculation or further processing.

Options

String columns
The string columns to convert to duration columns.
Duration type
The type of the duration to parse.
  • Auto-detected: Detects whether a date-based or time-based duration should be parsed. The type will be determined based on the first cell in each column which can be successfully parsed. Automatically detect whether the input is date-based or time-based.
  • Date-based: Converts all included columns to date-based duration columns, with data type "Duration (Date-based)".
  • Time-based: Converts all included columns to time-based duration columns, with data type "Duration (Time-based)".
If extraction fails
Action to take if the extraction fails.
  • Insert missing: Sets the output cell to missing if the string column cannot be converted to the specified type.
  • Fail: Fails with an error if the string column cannot be converted to the specified type.
Output columns
Depending on this setting, the output columns will either replace the modified columns, or be appended to the table with a suffix.
  • Replace: Replaces the selected columns by the new columns.
  • Append with suffix: Appends the selected columns to the input table with a new name that is the previous name plus the provided suffix.
Output column suffix
The suffix to append to the column names of the new columns.

Input Ports

Icon
Input table containing string columns with duration information.

Output Ports

Icon
Output table with strings parsed to durations.

Popular Predecessors

  • No recommendations found

Popular Successors

  • No recommendations found

Views

This node has no views

Workflows

  • No workflows found

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.