format-time-column adaptor formats date/time values in a datatable column.
Define the format of a date/time column and either replace the original column values or add a new column with the reformatted date-time.
data
Type: datatable
Required: Yes
The datatable containing the column to be formatted.
original column
Type: text
Required: Yes
The name of the column containing the date/time values.
original unit
Type: text
Required: No
The unit of time measurement of the original values. If unspecified, defaults to milliseconds.
new unit
Type: text
Required: No
The unit of time measurement of the new values. If unspecified, defaults to minutes.
new column
Type: text
Required: No
The name of the column to which the new values will be added. If unspecified, the new values will added to the original column (specified by original column), overwriting the original values.
data
Type: datatable
A datatable with formatted values.
Example 1: Default behaviour.
data:
original column: time
original unit: hours
new unit: minutes
new column : null (empty)
data:
-> Overwrote the data in the time column with the time in minutesinstead of hours
data:
original column: time (hours)
original unit: hours
new unit: seconds
new column : time (seconds)
data:
id
time (hours)
time (seconds)
-> Created a time (seconds) column with the time in seconds, derived from time (hours) column.
Standardize temporal data elements across different data sources where temportal data are stored in different formats
Simplify temporal data formats
Reformat temporal data elements to a format more useful for visualisation