Skip to main content

Change column type

Convert every value in a column to String, Number, DateTime or Boolean; empty cells stay empty.

Command in the Data Table toolkit · id ooa.datatable/change_column_type · 5 inputs (2 required), 1 output

Inputs​

InputTypeRequiredDefaultWhat it is
TableTableYesSource table.
ColumnStringNoColumn to convert.
TypeStringYesTarget type.
Column indexNumberNoZero-based column index; used when 'column' is empty.
Date formatStringNoPattern of the text when converting to DateTime, e.g. dd/MM/yyyy, or a ready format: ISO_DATE, ISO_LOCAL_DATE_TIME, ISO_OFFSET_DATE_TIME, BASIC_ISO_DATE, RFC_1123_DATE_TIME...; ISO dates when empty.

Outputs​

OutputTypeWhat it is
tableTableUpdated table.