cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
JMP is taking Discovery online, April 16 and 18. Register today and join us for interactive sessions featuring popular presentation topics, networking, and discussions with the experts.
Choose Language Hide Translation Bar
FN
FN
Level VI

Changing data type from character to continuous with JSL

I have a script that gets back the time as character. The format is correct but I want  to automate this change of data type automatically.

tsformat.jpg

How to do so in JSL scripting?

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: Changing data type from character to continuous with JSL

From the screenshot you are displaying, it appears that whatever methodology you are using to generate the TS_UTC column, that it is being generated as a character column.  The following JSL will convert from your character column to a numeric, continuous column, with your desired display format.

names default to here(1);
dt=current data table();
dt:TS_UTC<<data type(numeric)<<modeling type(continuous)<<format("yyyy-mm-ddThh:mm:ss");
Jim

View solution in original post

1 REPLY 1
txnelson
Super User

Re: Changing data type from character to continuous with JSL

From the screenshot you are displaying, it appears that whatever methodology you are using to generate the TS_UTC column, that it is being generated as a character column.  The following JSL will convert from your character column to a numeric, continuous column, with your desired display format.

names default to here(1);
dt=current data table();
dt:TS_UTC<<data type(numeric)<<modeling type(continuous)<<format("yyyy-mm-ddThh:mm:ss");
Jim