Namespace
Namespace using New Column
Summary: Creates a new column with date-time format and assigns a value to each cell, utilizing the Open() function and New Column() syntax.
Code:
dt = Open("data_table.jmp");
dt << New Column( "example", Numeric, Continuous, Width( 5 ), Format( ddMonyyyy h:m:s ), <<Set Each Value( 100 ) );
fmt = {};
fmt = Char( :example << get format );
Close( dt, nosave );
ns = New Namespace();
ns:format = "ddMonyyyy h:m:s";
Code Explanation:
- Open data table;
- Add new column named "example".
- Set column properties: numeric, continuous.
- Set column width to 5.
- Set column format to date-time.
- Assign value 100 to each cell in "example".
- Retrieve format of "example" column.
- Close dataset without saving.
- Create new namespace.
- Assign date-time format to namespace variable.