0 ×

Duration to Number

StreamableKNIME Date and Time Handling version 4.4.0.v202106241857 by KNIME AG, Zurich, Switzerland

Converts a duration to the selected field and appends the value as a long or double column. Valid fields are hours, minutes, seconds, nano-, micro- and milliseconds. If the output should be a long value the conversion result will be truncated, e.g. if the duration 1 hour 30 minutes should be converted to hours, the exact output is 1.5 hours whereas the truncated output 1 hour.

Note: Only time-based durations can be converted to numbers, since the conversion of date-based durations is not well defined (e.g. it is not clearly defined how many days a month has).


Column Selection

Column Selector
A time-based duration column can be chosen.

Conversion Settings

A granularity (hours, minutes, seconds, nano-, micro- or milliseconds) can be selected to which the duration gets converted.
Exact (double value)
The output will be the exact calculation, e.g. the duration 1 hour 30 minutes 30 seconds will be converted to 1.508 hours or 90.5 minutes or 5430 seconds etc.
Truncated (long value)
The output will be the truncated calculation, e.g. the duration 1 hour 30 minutes 30 seconds will be converted to 1 hour or 90 minutes or 5430 seconds etc.

Input Ports

Input table.

Output Ports

Output table containing the converted field as appended column (either long or double).

Best Friends (Incoming)

Best Friends (Outgoing)



To use this node in KNIME, install KNIME Base nodes from the following update site:


A zipped version of the software site can be downloaded here.

You don't know what to do with this link? Read our NodePit Product and Node Installation Guide that explains you in detail how to install nodes to your KNIME Analytics Platform.

Wait a sec! You want to explore and install nodes even faster? We highly recommend our NodePit for KNIME extension for your KNIME Analytics Platform. Browse NodePit from within KNIME, install nodes with just one click and share your workflows with NodePit Space.


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.