I am importing data from an excel spreadsheet. I have one column that exists in this excel as a duration (format=min:s). This is imported automatically as character. I would like to change it to a duration within a script. As suggested in lots of posts (eg here: Changing of column formats not working as I expect <<Format(Duration, :hr:m:s)
I tried the following:
column(dt,"Cycle Time")<<data type(Numeric)<<Modeling Type(Continuous)<<Format( "min:s",12,0);
but this gives me a column of only missing values. (dt is my imported data table, "Cycle Time" is the name of the column). The conversion works when I do it manually, using the Column Info dialog.
I am using Jmp15.1.0 on Windows. Any help would be greatly appreciated.
Go to Solution
There is an optional form of the << Data Type message that combines all three steps:
So your code might change to:
Column( dt, "Cycle Time" ) << Data Type( "Numeric", Format( "min:s" ) ) << Modeling Type( "Continuous" );
See if that form works better.
View solution in original post
Yep, that did the trick - thanks for the quick response!